Codex 1M Context Window Configuration Method
A method to enable a 1 million token context window in Codex was shared, involving editing the configuration file at ~/.codex/config.toml to set model='gpt-5.6-sol', model_context_window=1000000, and model_auto_compact_token_limit=900000. The user who shared the method expressed that they are not motivated to apply it, as they believe the default settings are well-tuned and shorter contexts may offer better performance and lower cost.
Key insights
Codex Supports a 1M Context Window via Simple Configuration
The configuration involves three lines in the config.toml file, specifying the model, context window size, and auto-compact token limit. The method is straightforward but requires manual editing.
Default Settings Are Considered Sufficient for Most Use Cases
The user notes that Codex's default context window is likely already optimized, and that a shorter context, if well-compressed, can be more performant and cheaper, making the 1M configuration unnecessary for many.