Ground Truth.
AI, checked against the source.

News · 2026-07-19

OpenAI Codex Only Lets You Fill 272K of a 400K Window, On Purpose

OpenAI's Codex coding agent lets you fill only about 272,000 of its 400,000-token context window, and that gap is deliberate. The remaining budget is reserved for the model's own output, and Codex further shows an 'effective' window of 258,400 tokens after applying a safety margin. A wave of user complaints framed this as a stealth downgrade from a larger window, but the primary sources tell a narrower story: Codex is exposing a safe input budget, not shrinking the model.

Key facts

A short primer: a context window is the total amount of text — measured in tokens, chunks of a word — that a model can consider at once, and it has to hold both the input you feed in and the output the model generates. If a coding agent lets you pack the entire window with input, the model can run out of room to actually answer, causing a hard overflow that kills the session. OpenAI's stated rationale is exactly this: leaving the input budget at 272,000 preserves headroom for output and lets Codex compact the conversation safely before it overflows. Picture a moving truck rated for a certain weight; the crew won't let you fill it to the axle limit with boxes, because they still have to fit themselves and the dolly inside to get anything delivered.

The friction is real, though, and it is mostly about ergonomics rather than the raw number. Users report that auto-compaction — Codex summarizing older turns to free space — can trigger early in long refactors and make the CLI look frozen while it works. One report described GPT-5.4 sessions succeeding around 635,000 to 672,000 tokens one day and then failing around 270,000 to 309,000 the next, which points at shifting runtime policy and compaction thresholds rather than a fixed model spec. In issue #9429, a user proposed raising the effective window to 350,000; OpenAI rejected it, saying the conservative default is by design and that a bigger usable budget would trade a smoother-feeling session for more outright overflow failures.

That exchange is the heart of the debate. Power users want longer uninterrupted work and are willing to risk occasional overflow; OpenAI is optimizing to avoid the session-killing failure mode. Both are defensible, and the confusion is largely a labeling problem — the UI and config can advertise a 400,000 total while the live system clamps to a smaller safe working set, so people feel a cut that did not happen to the model itself.

Which is where the circulating '372,000 to 272,000' framing falls apart. Checking OpenAI's repo and issue tracker, there is no evidence of a prior 372,000 setting. The user-visible 'drop' is the combination of surfacing the input budget and then applying the 95 percent margin, not a model being trimmed. This is really a token-budget governance question, close cousin to how key-value caching and compaction manage memory during long sessions.

Why it matters: as coding agents take on repository-scale work, how a tool budgets and compacts context shapes the day-to-day experience more than headline benchmark scores do. The honest caveat is that Codex genuinely does give you less usable input than its 400,000 total implies, and for very large codebases that is a real constraint — OpenAI's choice is a trade-off, not a free lunch, and reasonable users land on different sides of it.


Primary source, verified: read the paper →

Key questions

How big is Codex's context window really?

The model budget is 400,000 tokens total, but Codex exposes only 272,000 of that as usable input and reserves up to 128,000 for the model's output.

Why does Codex show 258,400 tokens instead of 272,000?

Codex applies a 95 percent effective-window safety margin to the 272,000-token input budget, which works out to 258,400, and it surfaces that smaller effective number in the runtime and UI.

Why do users think the context window was cut?

Because Codex started surfacing the input budget and safety margin instead of the headline total, long sessions began auto-compacting earlier, which felt like a downgrade even though the underlying model budget did not shrink.
Cite this

APA

Ground Truth. (2026, July 19). OpenAI Codex Only Lets You Fill 272K of a 400K Window, On Purpose. Ground Truth. https://groundtruth.day/news/why-codex-only-gives-you-272k-of-400k.html

BibTeX

@misc{groundtruth:why-codex-only-gives-you-272k-of-400k,
  title  = {OpenAI Codex Only Lets You Fill 272K of a 400K Window, On Purpose},
  author = {{Ground Truth}},
  year   = {2026},
  month  = {jul},
  url    = {https://groundtruth.day/news/why-codex-only-gives-you-272k-of-400k.html}
}

Topics: openai · codex · context-windows · developer-tools · coding-agents

Comments are replies to this story on Bluesky — reply with any Bluesky account to join in.