What Happened to Codex's Context
Codex is the AI coding agent from OpenAI—a tool that reads, writes, and revises code on its own. With this change, the amount the default model, GPT-5.6 Sol, can read at once fell by roughly 27%. Here is how events unfolded.
How the context cut came about
It Surfaced on GitHub, Not a Blog
This reduction was not announced on OpenAI's blog or in release notes. A GitHub change rewriting Codex's model configuration file (models.json) was merged on July 18, 2026, and that is how users found out. The fact that it was a quiet spec change, with no announcement, is why it drew such a strong reaction from the developer community. The Hacker News thread on the topic gathered more than 300 points and 145 comments.
- "context_window": 372000, + "context_window": 272000, — from the model configuration diff (372,000 to 272,000)
The 372k Limit Was Itself Brand New
Some context: the 372k limit was recent. Codex's limit was 272k in the GPT-5.5 generation and was raised to 372k when GPT-5.6 Sol arrived. In other words, this change returns a recently raised limit to its earlier value within weeks. Looking like something that had been widened and then quietly rolled back is what fed the distrust among users.
Why It Went Back to 272k
Two things sit behind the cut: the pricing structure of GPT-5.6 Sol, and the running cost of how Codex operates.
GPT-5.6 Sol pricing and the 272k boundary (API, per million tokens)
Above 272k Comes 2x Billing
Under OpenAI's pricing, once input to GPT-5.6 Sol exceeds 272k tokens, the entire request is billed at 2x input and 1.5x output. The old 372k setting reached well past that boundary, and a GitHub issue reported exactly this problem: default settings crossing into the higher-cost tier. The effect is that users burn through their usage faster without realizing it.
Prompts with >272K input tokens are priced at 2x input and 1.5x output for the full request. — from the pricing description (above 272k, the whole request is charged at the higher rate)
Default GPT-5.6 context can cross the 272K higher-usage threshold — from the title of the issue reporting that defaults cross the higher-cost threshold
The Official Reason: Cache-Read Cost
At first glance this looks like a change made to dodge the 2x billing, but OpenAI's Thibault Sottiaux says the main cause is not the pricing step—it is the cache-read cost, which grows as the context grows. An agent like Codex repeats tool calls (operations the AI invokes on the outside world, such as reading and writing files) many times over. Each one re-reads a large context, so the bigger the limit, the more internal cost accumulates, and the faster users' usage gets consumed.
It is caused by overall cost of cache reads going up with the size of the context being shuffled back and forth between toolcalls. — from the explanation of what drove the reduction
Impact on Long Code Sessions
For users, the question is how far this reaches work on large codebases. The numbers make the outline clear.
GPT-5.6 Sol context comparison (tokens)
Bulk Reads of Large Codebases
For everyday fixes and smaller repositories, 272k is enough in most situations. The impact lands on workflows that load a large number of files at once, or on long agent sessions where the context fills up over time. With a lower limit, compaction (summarizing older exchanges to make room) kicks in sooner, and each pass costs another re-read. The basic response is to hand over only the files the task needs rather than the whole repository, and to keep each task small. For how token consumption actually plays out in AI coding, see also our measurements of Claude Code's startup tokens.
When Will the Limit Return?
Sottiaux says the team is tuning the system so the limit can be raised again without increasing what users are charged. No date has been given. Note also that this change is a Codex-side configuration: when you use GPT-5.6 Sol directly through the API, the listed context remains 1,050,000 tokens. For work that genuinely needs an enormous context, direct API use—with the higher rate above 272k priced in—is the option for now.
1,050,000 context window — from the model specification (listed context for direct API use)
When you need to work through English primary sources such as Codex PRs and issues, converting the page to Markdown before handing it to an AI preserves the structure of tables and headings and improves the accuracy of the summary.
This reduction is not a downgrade in capability but a rollback of an expansion that outran its internal cost and billing assumptions. The work that actually suffers at 272k is limited, yet the distrust from a change made without any announcement remains. For now the practical approach is to keep using Codex while narrowing the context you hand it, and to wait for news about the limit going back up. If you truly need reads in the hundreds of thousands of tokens, direct API use at the listed 1,050k—with the higher rate accounted for—is the alternative to weigh.



