Post

Log inSign up

Post

Log inSign up

Tibo on X: "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 more code, tool output, and conversation history before summarizing older material. You need a model that supports it. And GPT-5.6 Sol, for example, has a documented 1,050,000-token window. Open ~/.codex/config.toml and add or update these settings at the top level, before any [section] headers: ``` model = "gpt-5.6-sol" model_context_window = 1000000 model_auto_compact_token_limit = 900000 ``` The first setting selects the model. The second tells Codex to use a one-million-token context budget. The third starts automatic history compaction around 900,000 tokens, leaving some headroom. Restart 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 ``` Have fun, but also know that we tuned the default carefully!"

Conversation

Log in or sign up for X

See what’s happening and join the conversation

Continue with phone
or
Log in with username or email

Relevant people

Avatar
Tibo@thsottiauxFollow
Codex & ChatGPT @OpenAI

What’s happening

Show more
Terms·Privacy·Cookies·Accessibility·Ads Info·© 2026 X Corp.
  • @thsottiaux
    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 more code, tool output, and conversation history before summarizing older material. You need a model that supports it. And GPT-5.6 Sol, for example, has a documented 1,050,000-token window. Open ~/.codex/config.toml and add or update these settings at the top level, before any [section] headers: ``` model = "gpt-5.6-sol" model_context_window = 1000000 model_auto_compact_token_limit = 900000 ``` The first setting selects the model. The second tells Codex to use a one-million-token context budget. The third starts automatic history compaction around 900,000 tokens, leaving some headroom. Restart 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 ``` Have fun, but also know that we tuned the default carefully!
    8:12 PM · Aug 16, 2026·
    3.8M
    Views
    1K
  • @TimJayas
    Tim Jayas
    @TimJayas
    Aug 16
    sounds too complex, i'll just copy past this tweet into my codex. thanks
    7
  • @pureFabx
    Fab
    @pureFabx
    Aug 16
    Tibo we all want this. Sol orchestrating Luna swarms may be the meta at the moment. Can you bring the Shepherd toggle?
    16
  • @SamGCoder
    SamG
    @SamGCoder
    Aug 16
    Can the UI Team add the following dropdown: Codex Work Mode Balanced ~300K context Earlier compaction Best for normal coding tasks Large Codebase ~600K context Retains more repo/tool history Moderate compaction Long-Running Investigation ~1M context Late compaction Best for reverse engineering, migrations, archaeology, debugging
    18