← AUTOMATER NEWSROOM

Codex Cuts Responses API Traffic by About 80% After Telling the Server to Stop Echoing the Tool Catalog

Codex's Charlie Marsh says a thread's Responses API traffic fell from 7.48 MB to 930 KB after two merged PRs stopped the server echoing its tool catalog.

Diagram comparing a Codex thread before and after a fix, showing a 7.48 MB before bar shrinking to a 930 KB after bar once the server stops echoing the tool catalogDiagram comparing a Codex thread before and after a fix, showing a 7.48 MB before bar shrinking to a 930 KB after bar once the server stops echoing the tool catalog
Before the fix, Codex's Responses API traffic repeated the full tool catalog on every turn; after setting the x-codex-exclude: tools header, one engineer's thread dropped from 7.48 MB to 930 KB.

OpenAI’s Codex team has cut the amount of data Codex pulls from OpenAI’s Responses API by roughly 80%, according to a Nov. 27, 2026 post on X from Codex engineer Charlie Marsh. In his own words: “We’ve reduced the amount of data Codex pulls from the Responses API by ~80%, as measured on my own threads. E.g., a thread that once took 7.48 MB now uses just 930 KB (both after compression).” That specific example is about an 88% reduction, steeper than the ~80% average he reports across his threads.

A screenshot of that post was attempted for this article, but X’s logged-out view renders only a skeleton placeholder in place of the post body, with a login panel and a “Relevant people” card naming Marsh as the only legible content. So the quote above comes directly from the fetched post text, not from an image, and no screenshot of the X post appears in this article.

The fix: stop echoing the tool catalog back to the client

The mechanism traces to two commits merged into the open-source openai/codex repository on Nov. 20, 2026. The first, PR #62863, “Ask the Responses API to omit the echoed tool catalog”, sets a single header on every Codex request to the Responses API:

x-codex-exclude: tools

The PR’s title names the underlying problem: the Responses API had been echoing the full tool catalog — the JSON schema describing every tool Codex can call, such as its shell and patch-apply tools — back to the client inside the response itself. The client already has that schema; mirroring it back on every turn of a long session adds bytes that carry no new information, and the cost compounds as a thread grows. Telling the server to omit that echo removes pure overhead.

GitHub pull request page for openai/codex PR #62863, 'Ask the Responses API to omit the echoed tool catalog,' showing the commit merged into main
The merged openai/codex pull request #62863, which sets the x-codex-exclude: tools header on Responses API requests. · Original source

The second commit, PR #62849, “Reduce allocations when preparing tool schemas and catalogs”, attacks the server-side cost of building that catalog in the first place. Per the PR’s own description, tool schema budget checks had been cloning the full schema and allocating a JSON buffer just to measure its size, and building Codex’s “Responses Lite” catalog had cloned tool definitions again before serializing them. The fix deserializes schemas from borrowed JSON during that size check, counts serialized bytes without allocating a throwaway buffer, and reuses the already-parsed schema when it fits the budget. It also serializes tool specs and namespace members directly from borrowed data rather than cloning them, while deliberately preserving the serialized field order because those bytes feed the additional_tools item ID. The PR adds a tool_catalog benchmark covering catalogs of 1 and 64 tool specs.

GitHub pull request page for openai/codex PR #62849, 'Reduce allocations when preparing tool schemas and catalogs,' showing the merged commit into main
The merged openai/codex pull request #62849, which removes schema-cloning and buffer allocation overhead when preparing Codex's tool catalog. · Original source

Flow diagram showing the Codex client sending a request with the x-codex-exclude tools header to the Responses API, which returns a smaller response, with a panel describing the server-side allocation fix in PR 62849Flow diagram showing the Codex client sending a request with the x-codex-exclude tools header to the Responses API, which returns a smaller response, with a panel describing the server-side allocation fix in PR 62849
PR #62863 stops the Responses API from echoing Codex's tool catalog on every turn; PR #62849 removes the schema-cloning and buffer allocation that built that catalog server-side.

Before After
Marsh’s example thread 7.48 MB 930 KB
Change — ~88% smaller (after compression)

Why it matters if you run long Codex sessions

Neither PR requires any action from users — the header is set by the Codex client itself, and the allocation cleanup is purely server-side. Anyone running Codex on a slow or metered connection, or watching egress from a CI runner or cloud sandbox, should see materially smaller payloads per turn once their Codex build includes these two commits. Neither PR’s description includes a latency measurement, a note about feature-flag gating, or a stated rollout timeline, so treat any speed improvement as a plausible but unverified side effect of sending fewer bytes rather than a confirmed result. The effect compounds with session length: the longer a thread runs and the larger its tool catalog, the more redundant echo there was to strip out.

The exact mechanism is Codex-specific: the x-codex-exclude: tools header is set by Codex’s own shared request code, and there’s no evidence it’s a documented, public option available to other Responses API callers. But the two ideas behind it are worth checking for in any tool-heavy integration you maintain, Responses API or not: avoid having a server echo back data the client already holds, and stop cloning a schema just to measure how big it is before deciding whether it fits a budget.

Picked up the same day

Marsh’s post reached Hacker News hours after he published it, under the same headline he used on X, though the submission had drawn only light discussion at the time it was captured.

The caveat

Marsh frames this as “measured on my own threads,” not an audited, fleet-wide average — real-world savings will scale with how large a given session’s tool catalog is and how many turns a thread runs through before compaction. Operators tracking Codex bandwidth or per-session cost should expect the size of the win to vary by workload rather than assume every thread drops by exactly 80%.

For teams already watching Codex’s token and usage accounting after this year’s billing changes, this is a reminder that not every meaningful efficiency gain shows up as a version number — some arrive as a header and a benchmark buried in a merged pull request. Automater’s guide to re-baselining Codex usage limits covers the billing side of that picture, and OpenAI’s own account of its Performance Factory for fixing agent-driven regressions shows the same kind of behind-the-scenes efficiency work happening elsewhere in the Codex and ChatGPT stack.

Sources

  1. Charlie Marsh on X: "We've reduced the amount of data Codex pulls from the Responses API by ~80%, as measured on my own threads. E.g., a thread that once took 7.48 MB now uses just 930 KB (both after compression)." / X
  2. Ask the Responses API to omit the echoed tool catalog by copyberry[bot] · Pull Request #62863 · openai/codex · GitHub
  3. Reduce allocations when preparing tool schemas and catalogs by copyberry[bot] · Pull Request #62849 · openai/codex · GitHub
  4. We've reduced the amount of data Codex pulls from the Responses API by ~80% | Hacker News