sakutto
Generative AI· GPT-5.6 Sol

Why Codex's Context Shrank to 272k: OpenAI's Explanation and the Impact

CodexOpenAIContext window
Why Codex's Context Shrank to 272k: OpenAI's Explanation and the Impact

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

Step 1
Alongside the launch of GPT-5.6 Sol, Codex's limit is raised from 272k to 372k
Step 2
Users report that the default settings cross the 272k higher-usage threshold
Step 3
On July 18, 2026, the change back to 272k (PR #33972) is merged
Step 4
OpenAI explains the reason and says it is working toward raising the limit again

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.

View official source →
- "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)

Standard rate
Input $5.00 / output $30.00
Input above 272k
The entire request moves to 2x input, 1.5x output
Problem with the old setting
Using the full 372k crossed into the higher tier by default
Main cause per OpenAI
Rising cache-read cost between tool calls

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.

View official source →
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)
View official source →
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.

View official source →
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)

Direct API use (listed)
1,050,000 tokens
Codex, previous limit
372,000 tokens
Codex, current limit
272,000 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.

View official source →
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.

Free ToolURL to Markdown ConverterConvert any public web page URL to Markdown. Preserves headings, tables, lists, and links — perfect for LLM and RAG preprocessing, research notes, and archiving web articles.Try it now →

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.

FAQ

Q. How much context can Codex use now?
The configured value is 272,000 tokens. A change merged on July 18, 2026 reduced it from the previous 372,000. Because Codex leaves room for compaction to run, the amount you can actually use is somewhat lower than the configured value.
openai/codex PR #33972 (models.json diff)
"context_window": 272000, openai/codex PR #33972 (models.json diff)
Q. What happens to API pricing above 272k tokens?
With GPT-5.6 Sol, a request whose input exceeds 272k tokens is billed at 2x input and 1.5x output for the entire request. The important part is that the higher rate applies to the whole request, not only to the portion above the threshold.
OpenAI official documentation (GPT-5.6 Sol)
Prompts with >272K input tokens are priced at 2x input and 1.5x output for the full request. OpenAI official documentation (GPT-5.6 Sol)
Q. Will Codex's context go back to 372k?
OpenAI's Thibault Sottiaux has said the team is tuning the system so the limit can be raised again without that translating into higher usage charges. No specific timing has been stated.
Digg report (Thibault Sottiaux's explanation on X)
What we're working on is tuning the system differently so that we can go back higher without it resulting in higher usage being charged. Digg report (Thibault Sottiaux's explanation on X)

Related Tools

Related Tool Categories

Articles