{"slug": "codex-on-aws-bedrock-bug-causing-10x-charges", "title": "Codex on AWS bedrock bug causing 10x charges", "summary": "OpenAI's Codex CLI version 0.147.0 lacks explicit cache controls for GPT-5.6 Sol on Amazon Bedrock, causing cache-write tokens to account for about 85% of estimated spend, with 171.94 million cache-write tokens costing an estimated $1,182.09 out of a total $1,386.46 over four days. The GitHub issue #37674 requests adding support for prompt_cache_options and prompt_cache_breakpoint to reduce costs for agentic coding workloads.", "body_md": "-\n[Notifications](/login?return_to=%2Fopenai%2Fcodex)You must be signed in to change notification settings -\n[Fork 16.6k](/login?return_to=%2Fopenai%2Fcodex)\n\n# Native Bedrock Codex GPT-5.6 Sol lacks explicit cache controls, producing high cache-write spend #37674\n\n[CLIIssues related to the Codex CLI](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22CLI%22)Issues related to the Codex CLI\n\n[aws-bedrockIssues related to AWS Bedrock provider](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22aws-bedrock%22)Issues related to AWS Bedrock provider\n\n[enhancementNew feature or request](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22enhancement%22)New feature or request\n\n[rate-limitsIssues related to rate limits, quotas, and token usage reporting](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22rate-limits%22)Issues related to rate limits, quotas, and token usage reporting\n\n## Description\n\n## Summary\n\nNative Codex CLI requests to Amazon Bedrock Mantle cannot opt into GPT-5.6 Sol explicit prompt caching. On an agentic coding workload, this has produced a large volume of cache-write tokens and materially higher cost.\n\nThis is related to [#35300](https://github.com/openai/codex/issues/35300), but adds independent production usage evidence from the native `amazon-bedrock`\n\nprovider.\n\n## Environment\n\n- Codex CLI:\n`0.147.0`\n\n- Provider: native\n`amazon-bedrock`\n\n- Endpoint: Bedrock Mantle Responses API,\n`us-east-1`\n\n- Model:\n`openai.gpt-5.6-sol`\n\n## Observed production usage\n\nFor the completed days 2026-08-05 through 2026-08-08, Cost Explorer usage quantities and the Bedrock rate card produced the following cache-aware estimate for Sol:\n\n| Requests | Cache-write tokens | Estimated cache-write cost | Estimated total cost |\n|---|---|---|---|\n| 3,656 | 171.94M | $1,182.09 | $1,386.46 |\n\nCache writes were about 85% of the model's estimated spend.\n\nA local Codex session also reported 76 Sol requests with 6.709M `cache_write_input_tokens`\n\n, zero `cached_input_tokens`\n\n, and an average of about 88K cache-write tokens per request. There were no client errors in the corresponding CloudWatch metrics.\n\nThese are usage-derived estimates, not finalized AWS invoice amounts.\n\n## Investigation\n\nCodex already emits a session-scoped `prompt_cache_key`\n\n, but the request types for both HTTP and WebSocket Responses requests do not include either:\n\n`prompt_cache_options`\n\n`prompt_cache_breakpoint`\n\nThe built-in Amazon Bedrock provider config exposes transport/auth settings, not structured request-body transformation, so this cannot be configured through `config.toml`\n\n.\n\nAWS documents explicit cache mode for GPT-5.6 on Bedrock specifically for agentic workflows with long stable instructions/tool definitions followed by changing tool and user content. That matches the workload above.\n\n## Requested behavior\n\n- Add support for serializing\n`prompt_cache_options`\n\nfor GPT-5.6-capable Responses providers. - Add a typed\n`prompt_cache_breakpoint`\n\nfield to supported input content blocks. - Provide a provider/model capability gate and a safe placement strategy at the end of Codex's measured stable instruction/tool prefix.\n- Surface cache reads and cache writes in per-turn usage telemetry so users can diagnose costly full-prefix rewrites.\n\n## Scope\n\nThis report does not claim that every cache write is a defect. Cold starts, genuinely distinct prompts, forks, and compaction can all require writes. The issue is that native Bedrock Codex currently has no way to use the documented explicit-cache mechanism for the stable-prefix case.\n\n## Metadata\n\n## Metadata\n\n### Assignees\n\n### Labels\n\n[CLIIssues related to the Codex CLI](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22CLI%22)Issues related to the Codex CLI\n\n[aws-bedrockIssues related to AWS Bedrock provider](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22aws-bedrock%22)Issues related to AWS Bedrock provider\n\n[enhancementNew feature or request](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22enhancement%22)New feature or request\n\n[rate-limitsIssues related to rate limits, quotas, and token usage reporting](https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22rate-limits%22)Issues related to rate limits, quotas, and token usage reporting", "url": "https://wpnews.pro/news/codex-on-aws-bedrock-bug-causing-10x-charges", "canonical_source": "https://github.com/openai/codex/issues/37674", "published_at": "2026-08-21 03:17:43+00:00", "updated_at": "2026-08-21 03:43:37.130635+00:00", "lang": "en", "topics": ["ai-tools", "ai-infrastructure", "large-language-models"], "entities": ["OpenAI", "Codex CLI", "Amazon Bedrock", "GPT-5.6 Sol", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/codex-on-aws-bedrock-bug-causing-10x-charges", "markdown": "https://wpnews.pro/news/codex-on-aws-bedrock-bug-causing-10x-charges.md", "text": "https://wpnews.pro/news/codex-on-aws-bedrock-bug-causing-10x-charges.txt", "jsonld": "https://wpnews.pro/news/codex-on-aws-bedrock-bug-causing-10x-charges.jsonld"}}