---
title: OpenAI Codex Only Lets You Fill 272K of a 400K Window, On Purpose — Ground Truth
url: https://groundtruth.day/news/why-codex-only-gives-you-272k-of-400k.html
description: OpenAI's Codex coding agent exposes a 272,000-token input budget inside a 400,000-token model window, reserving the rest for output, and users frustrated by early auto-compaction have mistaken the reserve for a downgrade.
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://groundtruth.day/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

News · [2026-07-19](https://groundtruth.day/news/2026-07-19.html)

# 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

- **The split:** OpenAI's maintainers explain the 400,000-token total as 272,000 input plus up to 128,000 reserved output.
- **The 258,400 number:** that is 272,000 times a 95 percent effective-window margin, surfaced in the runtime as `model_context_window`.
- **Where it is documented:** OpenAI's own issue tracker, including issues [#9429](https://github.com/openai/codex/issues/9429), [#19306](https://github.com/openai/codex/issues/19306), and [#19319](https://github.com/openai/codex/issues/19319), plus the repo's [models.json](https://github.com/openai/codex/blob/main/codex-rs/core/models.json).
- **Reception:** the [Hacker News thread](https://news.ycombinator.com/item?id=48965850) drew 300 points and 145 comments, much of it comparing Codex unfavorably to Claude Code's larger window.

A short primer: a [context window](https://groundtruth.day/learn/context-windows.html) 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](https://groundtruth.day/learn/kv-cache.html) 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 →](https://github.com/openai/codex/issues/9429)

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](https://groundtruth.day/tags/openai.html) · [codex](https://groundtruth.day/tags/codex.html) · [context-windows](https://groundtruth.day/tags/context-windows.html) · [developer-tools](https://groundtruth.day/tags/developer-tools.html) · [coding-agents](https://groundtruth.day/tags/coding-agents.html)

**Related on Ground Truth**

- [A trust wobble hits AI coding tools: hidden reasoning and a runaway bug](https://groundtruth.day/news/can-you-trust-what-the-coding-agent-tells-you.html) News
- [ChatGPT Pro’s $200 tier now includes a lower allowance, with an October transition for existing users](https://groundtruth.day/news/chatgpt-pro-200-lower-codex-allowance.html) News
- [OpenAI is selling a $230 keyboard with a dial for how hard the AI thinks](https://groundtruth.day/news/openai-codex-micro-keyboard.html) News
- [A developer’s switch to Pi puts the coding-agent harness in focus](https://groundtruth.day/news/developer-chooses-pi-over-claude-code.html) News

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