GPT‑5.6 Sol natively supports a 1,050,000‑token context window according to official OpenAI documentation. For a long time, Codex artificially capped this capability at 272K tokens for product‑level considerations. On August 17, 2026, OpenAI Codex engineer Tibo Duponchelle released a three‑line configuration snippet. This experimental tweak enables ChatGPT and Codex accounts to unlock the full 1‑million‑token context capacity. While the expanded window brings obvious benefits for large‑code‑base workloads, developers must understand sharp increases in token consumption and gradual recall degradation for distant context segments. This article breaks down configuration syntax, cost changes, benchmark performance, and a practical decision‑making framework for engineering teams.
Background: Why Codex Restricted the Native 1M Context
The official specification of GPT‑5.6 Sol lists input context capacity at 1,050,000 tokens, with a maximum practical input of 922,000 tokens and maximum output of 128,000 tokens. This is an inherent model capability, not a feature waiting for future model updates. The timeline of Codex context‑window adjustments is clear.
- GPT‑5.5 era: Codex default hard limit was 272K tokens.
- Initial GPT‑5.6 Sol launch: Codex briefly lifted the limit to 372K tokens.
- July 13, 2026: Codex silently rolled back to 272K after observing unexpected usage growth.
- August 17, 2026: Tibo published the three‑line config, opening experimental access to the full 1M window for all accounts.
From OpenAI’s perspective, the constraint comes from business and cost balancing rather than pure model capability. Longer context brings higher inference overhead. Codex Pro adopts fixed‑rate subscription billing. Unlimited large‑context usage would rapidly erode profit margins, so product teams enforced conservative default boundaries.
Three‑Line Configuration Syntax and Deployment Notes
The unlocking operation relies on three TOML configuration entries written at the very top of ~/.codex/config.toml, before any [section] tags. Placing these lines inside a section will treat them as local‑scope overrides and fail to take global effect.
model = "gpt‑5.6‑sol"
model_context_window = 1000000
model_auto_compact_token_limit = 900000
Parameter explanations:
-
model = "gpt‑5.6‑sol": Declares target model. Can be omitted if you already target this model elsewhere, but explicit declaration is strongly recommended. -
model_context_window = 1000000: Informs Codex to allocate the full 1‑million‑token context budget. -
model_auto_compact_token_limit = 900000: Triggers automatic history compaction near 900 000 tokens. Reserves safety headroom before hitting hard upper limits.
After saving the file, restart the Codex client and start brand‑new sessions. Existing ongoing conversations ignore this new configuration.
For temporary CLI‑only activation without modifying persistent config files, pass parameters directly in shell arguments:
codex -m gpt‑5.6‑sol \
-c model_context_window=1000000 \
-c model_auto_compact_token_limit=900000
A common pitfall: If these three lines appear after section headers, they only apply to that local section. Global unlocking will not work, even after client restarts.
Token Consumption Overhead After Enabling 1M Context
One widely discussed finding from community testing is that token consumption can nearly double once workloads stretch far beyond the default 272K window. This is rooted in Codex billing mechanics. Each inference step counts both input (conversation history plus current prompt) and output (code generation, tool‑call payloads).
Key drivers of higher token burn:
- Every reasoning round retains vastly longer conversation history.
- Each Agent sub‑step carries the full extended context into subsequent inference cycles.
- Multi‑turn complex Agent workflows produce approximately linear growth in token usage.
OpenAI researcher Noam Brown emphasized the value of built‑in automatic history compaction. Codex’s compaction logic is heavily optimized. It condenses old messages while preserving semantic meaning. For long‑running Agent tasks, well‑tuned auto‑compaction often delivers better total‑cost performance than brute‑force enabling the full 1‑million‑token window.
Under the default 272K setting, auto‑compaction activates at roughly 217 K tokens. When you raise model_auto_compact_token_limit to 900 000, compaction only triggers much later. Your system keeps nearly full raw history for the first 900 K tokens before starting summarization. This is not disabling compaction entirely; it delays its trigger point.
Real‑World Model Performance at Extended Context Lengths
The 1‑million‑token configuration does not guarantee uniform recall quality for every position across the full context range. OpenAI’s MRCR‑v2 multi‑range‑context recall benchmark quantifies this degradation.
| Context Range | GPT‑5.6 Sol MRCR‑v2 Score |
|---|---|
| Up to 256K‑512K | 91.5% |
| 512K‑1M | 73.8% |
Recall accuracy drops from 91.5 % down to 73.8 % once input tokens pass 512 K. Statistically, roughly one out of seven long‑distance retrieval attempts will fail or return incorrect reference information. This attention decay is a common trait across modern large language models, not a unique flaw of GPT‑5.6 Sol.
For engineering practice, this means the latter half of the 1‑M window (roughly beyond 512 K tokens) exhibits notable uncertainty for precise document retrieval. When working with huge repositories containing hundreds of source files, you cannot purely depend on native long‑context recall. Developers should combine retrieval‑augmented generation, explicit file indexing, and reference directives rather than blindly trusting raw context length.
Decision Framework: When Should You Enable 1M Context?
Scenarios Where 1M Context Brings Clear Benefits
- Massive single‑code‑base audits: Loading dependency relationships across hundreds of source files, where 272K cannot contain all required project context.
- Combined long‑document parsing and code generation: Working against complete PDF or markdown technical specifications while generating multi‑module implementations.
- Full‑trace debugging: Retaining complete error stacks, historical tool calls and revision logs without early compaction discarding critical trace information.
Scenarios Where Default 272K + Auto‑Compaction Works Better
- Conventional feature development: Most feature iterations only need current‑module and adjacent dependency context; 272K is sufficient.
- Short‑lived iterative tasks: Sessions get discarded after each unit of work. Larger windows add cost with zero practical gain.
- Cost‑sensitive fixed‑quota teams: Unpredictable exponential token burn can exhaust Codex Pro fixed‑rate quotas inside a single complex Agent task.
Two Core Strategies Compared
Default Auto‑Compaction Strategy
- Triggers summarization at 80 % of 272K. Condenses old conversation segments into semantic summaries.
- Supports near‑unbounded Agent runtime with predictable cost. Works well for most code‑generation tasks.
- Trade‑off: Summarization may drop fine‑grained details from very old messages. Not ideal when you need verbatim reference to early outputs.
Manual Unlocked 1M Context Strategy
- Preserves full raw conversation history without aggressive early summarization.
- Fits scenarios requiring strict historical fidelity: security audits, contract‑oriented code review.
- Trade‑off: Token expenditure rises sharply, and far‑distance recall accuracy declines.
Frequently Asked Practical Questions
Is the 1M‑context experimental feature free?
Right now it is available for all ChatGPT and Codex accounts without extra‑fee upgrades. But higher token consumption drains your quota faster. For Codex Pro fixed‑subscription users, heavy usage shortens effective available runtime. API‑metered accounts pay directly for actual token volume, so total expenses will increase accordingly.
What if I cannot locate the config.toml file?
Create it manually. On macOS / Linux the path is ~/.codex/config.toml. Windows users target %USERPROFILE%\.codex\config.toml. Paste the three unlocking lines at the top of this file.
Do I need to modify agent definition files such as AGENTS.md?
No mandatory edits are required. However check whether AGENTS.md contains local context_window overrides. Local section‑level parameters will override global top‑level settings and negate your 1M‑window configuration.
What does the MRCR‑v2 73.8 % recall score mean for real projects?
This is statistical accuracy under specific retrieval benchmarks. It does not mean one‑quarter of all output becomes broken. Degradation hits hardest when you ask the model to fetch exact details from content near the far end of the 1‑M token window. Information close to current‑prompt end remains reliable. For high‑stakes work, adopt explicit file reference instructions instead of fully leaning on implicit long‑context recall.
Summary
GPT‑5.6 Sol already owns native 1 050 000‑token context capacity. Codex kept it locked at 272K by default out of cost‑control and product‑pricing considerations. The three‑line experimental config removes this artificial barrier. Engineering teams gain two distinct operational modes: auto‑compaction for cost‑controlled day‑to‑day coding, and unlocked 1‑million‑token context for special heavy‑duty auditing and repository‑wide analysis.
Enabling the large window is not universally superior. It brings steep token‑consumption growth plus measurable recall degradation for distant context segments. You should select modes according to your actual task. When building multi‑model Agent workflows, developers can route different workloads through unified gateway capabilities such as 4sapi to balance cost, context requirements and model selection.
International access: https://4sapi.com
Domestic access: https://4sapi.cn
Top comments (0)