Unlocking 1.05M Tokens in Codex with Three Config Lines—Why It’s a Costly Trap
The author shows that adding three lines to Codex’s config file enables a 1.05 million‑token context window, but experiments reveal a 1.7× token‑usage increase, a steep accuracy drop, and clear guidelines on when (and when not) to use this setting.
OpenAI engineer Tibo announced that the GPT‑5.6 Sol model supports a 1.05 million‑token context window, but Codex ships with a smaller default; enabling the full window only requires three lines in ~/.codex/config.toml:
model = "gpt-5.6-sol"
model_context_window = 1000000
model_auto_compact_token_limit = 900000After inserting these lines and restarting Codex, the author ran a large project and observed that token consumption jumped 1.7 times compared with the default setting.
To quantify the effect, four test projects were created:
Small (5 k tokens): consumption 5 k, ratio 1.0×.
Medium (15 k tokens): consumption 15 k, ratio 1.0×.
Large (30 k tokens): consumption 34.2 k, ratio 1.1×.
Extra‑large (50 k tokens): consumption 74.2 k, ratio 1.5×.
Extreme (90 k tokens): consumption 154.2 k, ratio 1.7×.
The jump begins once the default context window of 258 k tokens is exceeded; OpenAI designed the system so that token‑consumption speed doubles beyond that point, as confirmed by Tibo’s warning.
OpenAI’s MRCR v2 benchmark shows accuracy of 91.5 % for the 256 k–512 k range, dropping to 73.8 % for the 512 k–1 M range—a loss of 17.7 percentage points, roughly 3.6 % per additional 100 k tokens.
GPT‑5.6 Sol’s MRCR v2 evaluation: 256K‑512K accuracy 91.5 %; 512K‑1M accuracy 73.8 %.
When asked what this decay means, an AI assistant replied that at 1 M context the model may forget details after the 800 k token mark, risking critical omissions.
Tibo also noted that Codex’s default 258 k window is carefully tuned for performance and cost, and that the automatic compact feature can summarise older tokens to keep consumption normal.
Two usage strategies were compared:
Enable 1 M context: all old code retained, but token usage roughly doubles and accuracy falls to 73.8 %.
Keep default 258 k with automatic compact: older code is summarised, token usage stays normal, though some detail may be lost.
Guidelines for enabling the 1 M window:
Use it for one‑off large‑code‑base analyses that require full‑text search across many files.
Avoid it for routine coding, bug fixing, or testing where each interaction only consumes a few thousand tokens.
For temporary needs, run Codex with the three‑line parameters in a single session, e.g.:
codex-mgpt-5.6-sol \
-c model_context_window=1000000 \
-c model_auto_compact_token_limit=900000This avoids polluting the global configuration, though the same token‑doubling penalty still applies within that session.
In summary, while the three‑line tweak unlocks a larger context window, it incurs higher cost and a noticeable drop in recall; the default 258 k setting remains sufficient for most tasks, and the 1 M option should be reserved for specific, large‑scale analyses.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
IT Xianyu
We share common IT technologies (Java, Web, SQL, etc.) and practical applications of emerging software development techniques. New articles are posted daily. Follow IT Xianyu to stay ahead in tech. The IT Xianyu series is being regularly updated.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
