<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to enable a 1M-token context window in Codex for GPT-5.6 Sol.]]></title><description><![CDATA[<p dir="auto">&lt;p&gt;Here is how to enable a 1M-token context window in Codex for GPT-5.6 Sol. &lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;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. &lt;/p&gt;&lt;p&gt;Open ~/.codex/config.toml and add or update these settings at the top level, before any &lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;[section] headers:&lt;/p&gt;&lt;p&gt;<code>&lt;/p&gt;&lt;p&gt;model = "gpt-5.6-sol"&lt;/p&gt;&lt;p&gt;model_context_window = 1000000&lt;/p&gt;&lt;p&gt;model_auto_compact_token_limit = 900000&lt;/p&gt;&lt;p&gt;</code>&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;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. &lt;/p&gt;&lt;p&gt;To try the configuration for a single CLI session without changing your defaults:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;<code>&lt;/p&gt;&lt;p&gt;codex -m gpt-5.6-sol \&lt;/p&gt;&lt;p&gt;  -c model_context_window=1000000 \&lt;/p&gt;&lt;p&gt;  -c model_auto_compact_token_limit=900000&lt;/p&gt;&lt;p&gt;</code>&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Have fun, but also know that we tuned the default carefully!&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;From Tibo: &lt;a target="_blank" rel="noopener noreferrer nofollow" href="<a href="https://x.com/thsottiaux/status/2089082893804896524" rel="nofollow ugc">https://x.com/thsottiaux/status/2089082893804896524</a>"&gt;<a href="https://x.com/thsottiaux/status/2089082893804896524" rel="nofollow ugc">https://x.com/thsottiaux/status/2089082893804896524</a>&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</p>
]]></description><link>https://nodebb.ai-router.dev/topic/525/how-to-enable-a-1m-token-context-window-in-codex-for-gpt-5.6-sol.</link><generator>RSS for Node</generator><lastBuildDate>Fri, 09 Oct 2026 16:10:12 GMT</lastBuildDate><atom:link href="https://nodebb.ai-router.dev/topic/525.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Aug 2026 06:16:48 GMT</pubDate><ttl>60</ttl></channel></rss>