How to Enable a 1M-Token Context Window for GPT-5.6 Sol in Codex
Codex users can configure GPT-5.6 Sol with a one-million-token context budget and set automatic compaction to begin at 900,000 tokens.
The published configuration guide instructs users to edit ~/.codex/config.toml and add or update three top-level settings: model = "gpt-5.6-sol", model_context_window = 1000000, and model_auto_compact_token_limit = 900000. These select the model, set the context budget, and trigger history compaction before the maximum is reached. Users should restart Codex and begin a new session after saving the file.
The same values can be supplied through CLI overrides for a single session, avoiding a permanent change to the default configuration. A larger window allows Codex to retain more code, tool output, and conversation history before older material is summarized.
The guide emphasizes that the one-million-token setting is not the default. The default limit is described as a performance-and-cost optimization, so expanding it may increase resource use or affect quotas. The available confirmation comes mainly from social posts, community discussions, and third-party coverage rather than directly verifiable official documentation.
Source evidence
1 Million Context to enable professional workloads - Codexcommunity.openai.com · supportingRestart the Codex client and start a new session after saving. To try the configuration for a single CLI session without changing your defaults: `codex -m gpt-5.6-sol` `-c model_context_window=1000000` `-c model_auto_compact_token_limit=900000` `codex -m gpt-5.6-sol` `-c model_context_window=1000000` `-c model_auto_compact_token_limit=900000` Have fun, but keep in mind that the default context limit has been tuned carefully for performance and cost. [...] great ^^ - we are half way there: “would be great!” is the real thing and matching your competitor at the same price point is what is needed. The current state is (when you compare your choices) → you buy the Pro Plan of Claude since OPUS does a similar JOB with 1M context and GPT SOL (might be better in some tasks sure) is simply crippled. This has just been shared tonight by Tibo on Twitter Here is how to enable a 1M-token context window in Codex for GPT-5.6 Sol. Codex is tuned to use a context limit that balances per
Enable 1M-Token Context Window in Codex CLI (GPT-5.6 Sol) | explainx.ai Blog | explainx.aiexplainx.ai · supportingA 1M-token window is a common user request — Tibo's post exists because enough people were asking for it that OpenAI decided to document the override rather than field the same question repeatedly. But "common request" and "correct default for most sessions" are different things, and the closing line makes clear which one OpenAI is optimizing the default for. ## The exact config: persistent default To make the 1M window Codex's default going forward, edit the Codex config file directly. Step 1. Open `~/.codex/config.toml`. `~/.codex/config.toml` Step 2. Add these three lines at the top level — before any `[section]` headers in the file: `[section]` `model = "gpt-5.6-sol" model_context_window = 1000000 model_auto_compact_token_limit = 900000` Each key does one job: [...] Each key does one job: | Key | What it sets | --- | | `model` | Selects GPT-5.6 Sol as the active model | | `model_context_window` | Sets Codex's context budget to 1,000,000 tokens | | `model_auto_compact_token
How to Unlock 1M Context in Codex - by Leonardo Gonzaleztrilogyai.substack.com · supportingTibo@thsottiaux GPT-5.6 Sol 1M in Codex. This used to only work for API keys, but we just flipped the switch and works for usage through ChatGPT accounts now too. The same warning applies, there is a reason the current context length is the default, we have tuned it to ~perfection. But you do Tibo @thsottiaux Here is how to enable a 1M-token context window in Codex for GPT-5.6 Sol. Even though we have tuned the context limit in Codex to be set optimally when it comes to performance and cost, this is a common ask, so here it is documented. A larger context window lets Codex retain 12:13 AM · Aug 17, 2026 · 1.57M Views 618 Replies · 253 Reposts · 6.05K Likes The earlier failures, the model catalog, and my long-context tests explain why this guide needs more than one TOML setting. [...] 146 Replies · 5 Reposts · 886 Likes The next day he posted the configuration values for a one-million-token window. They were familiar. I had already tried the same configuration months ago and foun
Codex Has a 1M Context Window — Here's How to Enable Ityoutube.com · supportingIf you've noticed your codex compacts its context at 256,000 tokens or That's because 1 million is not the default, despite it being advertised that GPT 5.6 sol does have a million context window. But here Tibo finally posted how to actually get your Codex to the million token context window, and the first thing we need to do is open this config file. We'll just use vim. So we'll do vim. we already have the model set to GPT 5.6 Sol and we don't see the other options that he listed. So all we do is press I for the interactive mode. So we could add the other options and then paste these two things. Model context window and model auto compact token limit and auto compact token limit is a bit smaller than the max context window because you want to give your agent a little bit of headroom. So [...] you want to give your agent a little bit of headroom. So it would actually be able to compact whatever you were doing, instead of it running into the context window limit and not doing anything a
Tibo on X: "GPT-5.6 Sol 1M in Codex. This used to only work for API keys, but we just flipped the switch and works for usage through ChatGPT accounts now too. The same warning applies, there is a reason the current context length is the default, we have tuned it to ~perfection. But you do you!" / Xx.com · supporting@thsottiaux Tibo @thsottiaux Aug 16 Here is how to enable a 1M-token context window in Codex for GPT-5.6 Sol. Even though we have tuned the context limit in Codex to be set optimally when it comes to performance and cost, this is a common ask, so here it is documented. A larger context window lets Codex retain 12:13 AM · Aug 17, 20261.6MViews 613 @xt0n1t3ch xt0n1 ツ @xt0n1t3ch Aug 17 Thanks Tibo! How about a reset to celebrate? 👀 11 @TheAhmadOsman Ahmad @TheAhmadOsman Aug 17 Tibo let’s celebrate with a performative reset 4 @SolipsRenatus Solipsnitsyn Renatus Aug 17 two posts now where you've mentioned this and failed to address the 2x cost above 258k [...] @thsottiaux Tibo @thsottiaux Aug 16 Here is how to enable a 1M-token context window in Codex for GPT-5.6 Sol. Even though we have tuned the context limit in Codex to be set optimally when it comes to performance and cost, this is a common ask, so here it is documented. A
"Tibo just made a guide on how to turn on 1M token context ...x.com · supportingHere is how to enable a 1M-token context window in Codex for GPT-5.6 Sol. Even though we have tuned the context limit in Codex to be set