Codex Users Unlock 1M Token Context for GPT-5.6 Sol with a Config Tweak
Developer Tibo discovered that editing a config file in the Codex client enables a 1M-token context window for GPT-5.6 Sol, and the trick works not only via the API but also for regular ChatGPT accounts. Teknium confirmed the capability is now open to all users. However, there are notable trade-offs: requests with inputs above 272K tokens are billed at double price across the entire request, and the extended window may sacrifice reasoning performance.
Confirmed
- Tibo's method: add three lines at the top of /.codex/config.toml (including model and modelcontextwindow = 1000000) and restart the client.
- dfinke noted an alternative: pass modelcontextwindow as a per-session command-line argument instead of editing the config file.
- Teknium confirmed Codex has opened the 1M context window to all users; Tibo's original claim was initially disputed but later verified.
- OpenAI's official documentation has long supported this configuration; the limitation was in the Codex client's defaults.
- Per OpenAI's pricing page, once input exceeds 272K tokens, the entire request is billed at double the price, doubling overall cost.
- heypearlai cautioned that the extended window sacrifices reasoning performance and that the default cap was deliberately tuned; eyishazyer likewise called it a trade-off rather than a free upgrade.
Why it matters
- Regular users can bypass the default context limit without waiting for an official rollout, which is valuable for long documents and large codebases.
- Double billing and potential performance losses mean the larger context is not free; users should evaluate whether to enable it based on actual task size.
2026-08-17 ~ 2026-08-18 · 12 related posts
Primary sources
- How to enable 1M-token context window in Codex — kimmonismus ·
- Codex Opens 1 Million Context to All After Technical Discussion — Teknium ·
- ChatGPT Extended to 1M Context Window — heypearlai ·
- [source] How to enable 1M-token context window in Codex — kimmonismus · 2026-08-17
- OpenAI Codex now supports 1M token context window — Moh1tAgarwal · 2026-08-17
- Unlock 1M Context for GPT-5.6Sol in Codex with Simple Config — 量子位 · 2026-08-17
- [source] Codex Opens 1 Million Context to All After Technical Discussion — Teknium · 2026-08-17
- [source] ChatGPT Extended to 1M Context Window — heypearlai · 2026-08-17
- Unlocking ChatGPT's 1M Context Window: Costs Double After 272K Tokens — eyishazyer · 2026-08-17
- Debate on 1M context: Utility vs. double cost tradeoff — eyishazyer · 2026-08-17
- Dev Demonstrates Extending Codex Context to 1 Million Tokens Using GPT-5.6 — petrusenko_max · 2026-08-17
- Codex Config: Enabling 1M token context window — dfinke · 2026-08-17
- How to enable 1M-token context window in GPT-5.6 Sol — JeremyNguyenPhD · 2026-08-18
2 near-duplicate retellings: soumitrashukla9 · SimplyAnnisa