The Codex Changelog
All Episodes
Optimizing Codex App-Server Listings with Output Deferral

Optimizing Codex App-Server Listings with Output Deferral

0:00|0:00

A deep dive into PR 59601 in the Codex 0.167 and 0.168 alpha line, which introduces experimental command output deferral to speed up thread/items/list payloads. The episode also touches on Windows sandbox ACL fixes, Python SDK build updates, and OpenAI's acquisition of Pierre Computer Company.


Chapter 1

Deferring command output in thread items

James Turner

Thanks to Jellypod for helping make this daily show a reality. Today's topic is a small protocol change that matters if you build on the Codex app-server: PR 59601, which adds command output deferral to thread item listings. It was merged November 5th, and it lands in the 0.167 and 0.168 alpha line. One caveat up front: it's experimental, so don't expect it in stable.

James Turner

Some context. Codex 0.166.0 is still the stable release on npm. The 0.167 line shipped alphas but never got a stable release, and on November 4th the npm alpha tag moved to 0.168.0-alpha.1. So this feature lives in preview territory. The GitHub release entries for those alphas are one-line titles, so the details come from the PR itself.

James Turner

What changed. The endpoint is thread/items/list in the app-server JSON-RPC interface. There's a new parameter, deferOutput, and you pass it as an object: commandExecution set to true. You send it while querying a specific turnId. And because it's experimental, your client has to opt in during the initialize handshake, with capabilities.experimentalApi set to true. Without that, the server rejects experimental fields.

James Turner

Now the behavior. For a completed command, the server suppresses the raw output only if three things are true. It has a recorded completion time. It has an exit code of zero. And it has non-empty saved output. When all three hold, the item comes back with outputDeferred set to true, and item.aggregatedOutput set to null.

James Turner

Why care? Think about what thread/items/list does in a real client. You call it to render a turn: a timeline, a summary, a progress view. If that turn ran a big test suite, a build, or a noisy linter, you were pulling megabytes of stdout and stderr just to draw a list of steps. That means bigger payloads, latency spikes, and memory pressure in IDE extensions, CI runners, and custom web frontends. With deferral, you render the lightweight timeline instantly, and move the heavy bytes only when somebody clicks View Output, or when an agent needs to inspect a step.

James Turner

How do you use it? First, initialize with the experimental capability on. In your initialize params, clientInfo as usual, then capabilities with experimentalApi true. Then send initialized. Next, call thread/items/list with your turnId and deferOutput set to commandExecution true. Items that qualify come back with the null output and the outputDeferred flag. When your UI needs the text, call thread/items/read with that same turnId and the specific itemId, and you get the full item.

James Turner

The Rust SDK side deserves attention. Conversion from ThreadItemEntry to ThreadItem is now fallible. That's deliberate. Typed consumers have to explicitly detect deferred output, instead of silently treating an incomplete item as complete. So if you're a Rust consumer, expect to handle a Result where you used to have a plain conversion, with TryFrom semantics. A compile error now beats a quietly empty build log later.

James Turner

Caveats. One, scope. Deferral only applies when you target a single turnId. Listings that span multiple turns still return full output, and so does the default call when you don't pass the parameter. Two, eligibility. A command with a nonzero exit code is never deferred, so failure diagnostics stay immediately available. That means a noisy failing build still sends its whole log, so don't assume payloads shrink across the board. Three, your own code: anything that reads aggregatedOutput must now handle null.

Chapter 2

Smaller changes this week

James Turner

A few smaller items from the past week. PR 59233 fixes Windows sandbox ACL handling. It runs resolve_for_enforcement when building restricted token and elevated sandbox overrides, keeps read-only carveouts at volume roots, and expands deny-read ACL targets to prevent unintended leaks. PR 59677 removes the legacy summarize_sandbox_policy helper in favor of summarize_permission_profile, which matters if you call that internally. And PR 59512 modernizes the Python SDK build, requiring uv_build at least 0.13.0 and below 0.14, with lockfiles refreshed to 0.13.6.

James Turner

On the wider ecosystem, OpenAI announced on November 4th that it's acquiring Pierre Computer Company, the makers of Code Storage, Trees, and Diffs, aimed at Git and source control infrastructure for coding agents. That's the announcement; what it means for Codex is not yet spelled out. That's the update. If you run an app-server client, try deferOutput on a preview build and see how much your turn listings shrink.