Codex 0.147.0 Adds Native Bedrock Compaction
We break down how Codex CLI 0.147.0 brings native Amazon Bedrock search caching and server-side conversation compaction to cut latency, reduce token waste, and keep long-running agent sessions snappy. The episode also covers setup tips, IAM and cross-region caveats, plus quality-of-life fixes like bearer token redaction, frozen terminal input resolution, and stronger project trust prompts.
Chapter 1
Native Amazon Bedrock Search and Compaction in Codex 0.147.0
Ethan Park
If you have been running the Codex CLI against Amazon Bedrock in a big enterprise environment, you, you know the exact wall we have all been hitting. You get five or six turns into a multi agent refactoring job, and suddenly... boom, context buffer exhausted, or your turn latency climbs through the roof. Before we dig into how version 0.147.0 fixes this, a quick shoutout to Jellypod for helping make this daily show a reality. But yeah, Maya, the, the history payload problem on Bedrock was real.
Maya
Oh, it, it was brutal, Ethan. Like, every single turn, local CLI truncation was basically re streaming the full conversation history over the wire. If you had subagents doing background passes, you were paying full token price over and over. But 0.147.0 drops two massive pull requests for Bedrock. Pull request 36938, which enables cached web search, and 36981 for remote conversation compaction.
Ethan Park
And that compaction piece is the real shift here, right? Because instead of your local machine trying to truncate and assemble this huge prompt payload, it actually offloads the context window management directly to AWS Bedrock endpoints.
Maya
Right, exactly! Bedrock now handles the prompt caching layer and server side compaction natively. So when a long running agent session hits a threshold, Bedrock compacts the conversation history right on the server side. On multi agent workflows, AWS benchmark tests showed turn latency dropped by up to 60 percent.
Ethan Park
Sixty percent faster turns is huge when you are sitting there watching a terminal. But for engineering managers, the real eye opener is the AWS token billing statement. You are no longer re sending hundreds of thousands of identical tokens on turn ten that you already sent on turn nine.
Maya
Mm, totally. And from a developer machine perspective, what were you noticing with local memory?
Ethan Park
Well, when you have three subagents spinning in the background, keeping full uncompacted histories in local memory was causing noticeable CLI stutter. Now that Bedrock owns the compaction state remotely, the local CLI process stays lightweight, even during heavy code refactoring runs.
Chapter 2
Configuration Patterns Caveats and Quality of Life Upgrades
Maya
So if someone wants to turn this on in their project today, what does the config look like in dot codex slash config dot toml?
Ethan Park
It is pretty straightforward. You set CODEX PROVIDER to bedrock in quotes, map your target AWS region endpoints, and then you can specify custom compaction thresholds if you are running Claude models on Bedrock. But there are a couple of operational caveats to keep in mind.
Maya
Like cross region inference? I know AWS gets picky with Bedrock model IDs if you are routing across regions.
Ethan Park
Yeah, precisely. You have to ensure your IAM roles permit cross region inference profiles if your primary region hits quota. Also, cached search queries have their own specific rate limits on the Bedrock side. And, uh, if you rely on local SQLite transcript replays for debugging, remember that remote compaction means the local log stores the compacted summary state rather than every raw verbose turn.
Maya
Ah, that is a really good callout for debugging teams. But speaking of security and logs, 0.147.0 brought some big quality of life patches too, right?
Ethan Park
Yes, pull request 36893 now automatically redacts bearer tokens from command history logs. So if a tool execution outputs an authorization header, it gets scrubbed before hitting disk.
Maya
Thank goodness. No more accidental secret leaks in log files. And they fixed that annoying terminal input freeze, too, under pull request 35649, right?
Ethan Park
Man, that bug was frustrating. If you were starting up Model Context Protocol servers or switching window focus in Ghostty, the terminal input would just freeze up. That is finally resolved. Plus, pull request 36960 adds mandatory project trust prompts whenever you open Codex in an unfamiliar local directory.
Maya
Which is huge for zero data retention corporate security. Getting full Bedrock feature parity with first party OpenAI endpoints means enterprise teams can finally run Codex CLI at scale inside their private AWS perimeter.
Ethan Park
Absolutely. Alright, that is Codex 0.147.0. Talk to you next time.