Native Bedrock Codex GPT-5.6 Sol lacks explicit cache controls, producing high cache-write spend
A GitHub issue reports that the Native Codex CLI requests to Amazon Bedrock Mantle cannot opt into GPT-5.6 Sol explicit prompt caching, resulting in a large volume of cache-write tokens and higher cost.
Intelligence analysis by Llama
The issue describes a problem with the Native Codex CLI requests to Amazon Bedrock Mantle, where explicit prompt caching is not supported for GPT-5.6 Sol, leading to high cache-write spend.
Imagine you're using a powerful tool to help you write code. But every time you make a small change, the tool has to start over from scratch, which takes a lot of time and resources. That's what's happening with the Native Codex CLI and Amazon Bedrock Mantle. They can't use a special feature called explicit cache controls, which would make the tool work much more efficiently.
Analysis
GPT-5.6 Sol and Explicit Cache Controls
The issue at hand revolves around the Native Codex CLI's inability to opt into explicit prompt caching for GPT-5.6 Sol when using Amazon Bedrock Mantle. This limitation leads to a significant increase in cache-write tokens and, consequently, higher costs. The problem is not unique to this specific scenario, as it is related to a broader issue with the Codex CLI's interaction with the AWS Bedrock provider.
Investigation and Analysis
The investigation reveals that the Codex CLI already emits a session-scoped prompt_cache_key, but the request types for both HTTP and WebSocket Responses requests do not include either prompt_cache_options or prompt_cache_breakpoint. This means that the built-in Amazon Bedrock provider config exposes transport/auth settings, but not structured request-body transformation, making it impossible to configure explicit cache mode through config.toml.
Requested Behavior
To address this issue, the requested behavior is to add support for serializing prompt_cache_options for GPT-5.6-capable Responses providers. Additionally, a typed prompt_cache_breakpoint field should be added to supported input content blocks. A provider/model capability gate and a safe placement strategy should be implemented at the end of Codex's measured stable instruction/tool prefix. Finally, cache reads and cache writes should be surfaced in per-turn usage telemetry to enable users to diagnose costly full-prefix rewrites.
Scope and Implications
It is essential to note that this 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.
Key points
- Native Codex CLI requests to Amazon Bedrock Mantle cannot opt into GPT-5.6 Sol explicit prompt caching.
- This leads to high cache-write spend and associated costs.
- The issue is related to a broader problem with the Codex CLI's interaction with the AWS Bedrock provider.
- The requested behavior is to add support for serializing prompt_cache_options and prompt_cache_breakpoint fields.
- Cache reads and cache writes should be surfaced in per-turn usage telemetry to enable users to diagnose costly full-prefix rewrites.
If the requested behavior is implemented, developers using the Native Codex CLI with Amazon Bedrock Mantle can expect to see significant improvements in performance and cost savings. This would make the tool more efficient and reliable, allowing developers to focus on their work without worrying about the underlying technical issues.
If the issue is not addressed, developers may continue to experience high cache-write spend and associated costs. This could lead to frustration and decreased productivity, ultimately affecting the quality of their work.