The Codex Changelog
All Episodes
Codex 0.151.0: Subagent Budgets and MCP Middleware

Codex 0.151.0: Subagent Budgets and MCP Middleware

0:00|0:00

We break down Codex 0.151.0’s biggest agent-safety upgrades, including root-level token budgeting for subagents and middleware that can inspect, sanitize, or replace MCP tool output before it reaches the model. The episode also covers sandbox hardening fixes, permission profile preservation, Guardian cache invalidation, and startup grace period improvements.


Chapter 1

Extension Tool Middleware and Subagent Root Budgeting in Codex 0.151.0

Ethan Park

You know, there is this absolute silent killer when you build multi agent setups where a nested subagent gets stuck in a loop, burns through twenty thousand tokens in three seconds, and you do not even realize it until your root session crashes.

Maya

Oh, I have been there! You check the terminal and it is just money evaporating into the void. Big shoutout to Jellypod by the way, for helping us make this daily show a reality every morning so we can cover fixes for exactly that kind of nightmare.

Ethan Park

Absolutely. Huge thanks to Jellypod. And speaking of agent nightmare fixes, OpenAI dropped Codex zero point one five one point zero today, and it hits that exact problem head on.

Maya

Okay, so pull back the curtain. What actually changed under the hood with subagent budgets in pull request four one one eight three?

Ethan Park

So previously, if your root prompt spawned a subagent to go inspect a directory or refactor a module, that subagent maintained its own isolated local token counter. It had its own little sandbox world. But now, in zero point one five one point zero, every single token consumed by a subagent is aggregated directly against the parent session root goal budget.

Maya

Wait, so if I give my main task a fifty thousand token budget, and my main agent spins up three helper subagents...

Ethan Park

They are all drawing from that exact same fifty thousand token pool. The moment the sum of root tokens plus subagent tokens hits your ceiling, boom, execution stops.

Maya

Mm, okay, that is a massive safety net against runaway loops, but there is a real catch there for developers, right? If you set a tight budget, say ten thousand tokens, and you ask for a complex codebase refactor, your subagent might be halfway through writing a critical class and get hard killed right mid sentence because the root budget ran out.

Ethan Park

Exactly. You have to recalibrate your root goal limits now. You cannot just copy over your old single agent numbers because subagents are no longer getting a free pass on token consumption.

Maya

That makes total sense. Now what about the other huge headline feature in this release, the extension middleware for Model Context Protocol, or MCP tools?

Ethan Park

Oh, pull request four one two zero two is huge if you run tools that vomit massive payloads. Extensions registered in Codex zero point one five one point zero can now inspect, sanitize, or completely replace raw JSON and text outputs from MCP tools before those payloads ever reach the model context window.

Maya

Wait! Client side interception before it hits the context?

Ethan Park

Yes! Think about what happens when an MCP database tool returns a fifty kilobyte JSON response with a thousand rows, but your prompt only needed three fields from two records. Previously, that entire fifty kilobyte blob was dumped straight into your context window, burning context and costing real money.

Maya

Or worse, returning an internal API key or bearer token inside a debug header that gets fed straight into the model prompt.

Ethan Park

Exactly. Now, with middleware extensions, you can write a tiny filter script that intercepts the tool output, strips out sensitive headers, prunes away seventy percent of the useless JSON fields, and forwards only the lean, clean payload to the model.

Maya

That is incredible for both security and prompt efficiency. I love that control sitting right on the client side.

Chapter 2

Sandbox Directory Hardening Guardian Invalidation and Startup Grace Periods

Maya

Beyond middleware and token budgets, I saw a whole cluster of security and sandbox fixes in the changelog. What was going on with the TUI session paths and permission profiles?

Ethan Park

Okay, so pull requests four one one nine two and four one two zero nine fixed a couple of subtle sandbox leaks. In older versions, if you changed directories using slash cd inside an interactive terminal session, it could actually weaken your preconfigured sandbox boundaries or lose track of restored permission profiles across turns.

Maya

Yikes. So you change directory to inspect a subfolder and suddenly your permission profile loses its strict boundary enforcement?

Ethan Park

Right. In zero point one five one point zero, permission profiles are preserved perfectly across TUI turns, and path resolution now respects the remote executor actual home directory, operating system, and path semantics under pull requests four one two zero four and four one two zero seven. So Windows backslashes versus Linux forward slashes won't bypass your deny read rules anymore.

Maya

And what about the Guardian security layer? I saw a bug fix there around stale classification cache.

Ethan Park

That was pull request four one one nine six. If you modified your security approvals or updated permission states mid session, the Guardian classification system was sometimes holding onto cached approvals from before the change, meaning an action you just revoked could still execute because of a stale cached decision. Now, any permission state change revokes those cached classifications immediately.

Maya

Good catch. Now, what about developer quality of life? Anything for people whose tools take forever to boot up?

Ethan Park

Oh, absolutely. Pull request four one one nine nine added a configurable startup grace period for discovering optional MCP servers. If you have an MCP server that takes five seconds to initialize, Codex won't just fail or hang your entire command line interface startup. You can set the grace period to wait gracefully.

Maya

And pull request four one two zero eight fixes plugin catalog aggregation! So if you have a broken project marketplace in one repository, it won't crash or suppress your valid local plugins anymore. It just flags the invalid one and loads everything else cleanly.

Ethan Park

Precisely. So if you are upgrading to Codex zero point one five one point zero today, review your root goal token budgets for multi agent workflows, write a custom extension filter if your MCP tools return bloated JSON, and enjoy the tighter sandbox enforcement.

Maya

Solid release overall. Good stuff from the OpenAI team. Talk to you all tomorrow!