Missing Prompt-Cache Controls Inflate Codex-on-Bedrock Bills ~10x
A production bug report against Codex CLI (v0.147.0) shows that its native Amazon Bedrock provider has no way to opt into GPT-5.6’s explicit prompt caching, so agentic coding sessions repeatedly pay to write the prompt prefix to cache instead of cheaply reading it back. Codex already emits a session-scoped prompt_cache_key, but the HTTP and WebSocket Responses request types omit the fields that would actually enable caching — prompt_cache_options and prompt_cache_breakpoint — and Bedrock’s built-in provider config only exposes transport and auth settings, not request-body shaping, so there’s no workaround in config.toml.
The cost impact is stark. Usage-derived estimates for Aug 5–8, 2026 attribute roughly 85% of the model’s spend to cache writes, and a single local session logged 76 requests generating 6.7M cache-write tokens with zero cache reads — about 88K written tokens per request — all with no client-side errors. Because agentic workloads keep a long, stable prefix of instructions and tool definitions in front of changing user content, they are exactly the case AWS documents explicit cache mode for, which makes the missing support especially costly.
The reporter asks OpenAI to serialize prompt_cache_options for GPT-5.6-capable Responses providers, add a typed prompt_cache_breakpoint on input content blocks, gate the behavior by provider/model capability with safe placement at the end of the stable prefix, and expose per-turn cache read/write telemetry so operators can spot runaway full-prefix rewrites. The filing is careful to note that not every cache write is a defect — cold starts, forks, and context compaction legitimately require writes — but that native Bedrock Codex currently offers no path to the documented explicit-cache mechanism at all.
Read the full article
Continue reading at Hacker News →This is an AI-generated summary. Read the original for the full story.