One Million Tokens, Three Lines
It takes three lines.
The settings file is ~/.codex/config.toml.
Add the lines below and you're done.
model = "gpt-5.6-sol"
model_context_window = 1000000
model_auto_compact_token_limit = 900000Save, then restart Codex.
The settings apply when you open a new session.
You can also run it once from the CLI.
codex -m gpt-5.6-sol -c model_context_window=1000000 -c model_auto_compact_token_limit=900000These settings are exactly as in the original post.
Tibo Sottiaux shared them.
He is the lead of OpenAI Codex.
It was posted at 05:12 KST on 2026-08-17.
The original post has 584,000 views.
The target model is GPT-5.6 Sol.
Its documented context is 1,050,000 tokens.
Three lines turn on the 1M context.
You can follow the related discussion in GitHub issue 19464.
GitHub issue 19208 is also a useful reference.
Why Codex Hides the 1M Window
Codex's default context is tuned smaller.
The exact default figure hasn't been published.
It's a default that trades performance against cost.
Experimental 1M support has continued since GPT-5.4.
GPT-5.4 launched on 2026-03-05.
You can check GitHub issue 19464.
GitHub issue 19208 is also worth a look.
The key is balancing performance and cost.
A big window is powerful but heavy.
The Practical Headroom of 900K Compaction
Auto-compaction starts at 900,000 tokens.
It compacts before the context fills up.
There's 100,000 tokens of headroom between the window setting (1 million) and the compaction threshold (900,000).
Even as the conversation grows, you avoid abrupt truncation.
Here are the settings in a table.
| Setting key | Value | Role |
|---|---|---|
| model | "gpt-5.6-sol" | Selects the model |
| model_context_window | 1000000 | Context window size |
| model_auto_compact_token_limit | 900000 | Threshold for starting auto-compaction |
1M Isn't a Cure-All
A large context has a price.
Latency and cost rise together.
That's why the default is tuned smaller.
1M support has been experimental since GPT-5.4.
You need to verify stability project by project.
For short tasks, the default setting is more efficient.
1M only pays off for long codebase analysis.
It's a setting to turn on only when you need it.
