Add optional Redis-backed storage for Codex prompt cache IDs so cache keys stay stable across replicas while preserving the existing in-memory path when Redis is unset or unavailable. Wire codex prompt-cache config through YAML and environment overrides, apply the shared cache helper in both HTTP and WebSocket executors, and add tests for config defaults/sanitization, Redis TTL behavior, retention semantics, and explicit prompt_cache_key precedence.
- honors explicit prompt_cache_key before retention-based disable logic
- preserves short configured/request TTL values (for example 7s) instead of forcing a 1m minimum
- uses GET/SETNX/GET winner flow for distributed cache ID creation with local fallback on Redis errors
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>