Codex on GPT-6.1 Sol trims its window to 828 400 but still accepted an 888-thousand-token input

A developer noticed that Codex CLI on GPT-6.1 Sol reports a window of 828 400 tokens, even though the config is set to one million. The number comes from the server-side catalog: max_context_window of 872 000 multiplied by effective_context_window_percent of 95. A control run produced an unexpected result. An 888 330-token input went through with no changes, and all three markers were found. So the parameter sets how much history the client keeps before auto-compaction, not a ceiling on a single message. • Per the API documentation, the input ceiling is 922 000 tokens • A custom catalog raised the window to 900 000, but it quietly went stale after the model switch

AI-processed from Habr AI; edited by Hamidun News
Codex on GPT-6.1 Sol trims its window to 828 400 but still accepted an 888-thousand-token input
Source: Habr AI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHabr AI ↗
Editor-in-Chief
Key metric #1Per the API documentation, the input ceiling is 922 000 tokens
Key metric #2A custom catalog raised the window to 900 000, but it quietly went stale after the model switch
Key metric #3Calibration, 30 302 characters, custom catalog: 115 300 tokens, 3 of 3 markers.

~/.codex/config.toml sets model_context_window = 1000000, but in every task Codex on GPT-6.1 Sol reports a window of 828 400 tokens. The author of a write-up on Habr traced where that number comes from, raised it to 900 000 with a custom model catalog, and ran a synthetic 890 547-token input with control markers. The key finding came from the control run: the same text at 888 330 tokens also went through on the stock 828 400 window. The window in Codex does not limit the size of a single incoming message.

Where 828 400 comes from

Codex fetches model parameters from the server and caches them in ~/.codex/models_cache.json. The GPT-6.1 Sol entry contains context_window 500 000 (the default), max_context_window 872 000 (the config cannot raise the window above it), and effective_context_window_percent 95. The result: 872 000 × 0.95 = 828 400.

The author did not rely on a single session. From the ~/.codex/sessions logs he took the last 40 tasks: 39 on gpt-6.1-sol and one from the internal codex-auto-review. All 39 token_count events show model_context_window: 828400. The value sits in the info.model_context_window field, while the actual input and output of the last request are in last_token_usage. The log format is not documented as stable, so the field may move after a client update.

The 890-thousand-token test with markers

Using the model_catalog_json parameter, the author plugged in a copy of the server catalog in which gpt-6.1-sol has max_context_window set to 1 000 000 and the percentage set to 90. That gives 900 000. He took the 10% margin from September probes on GPT-6 Astra: a successful input there was 900 089 tokens, while filler of 909 000 and up ended in an overflow error.

The filler has to be token-dense. In September, a text of 1 720 376 characters was stopped by the client itself, which refused to pass a message longer than 1 048 576 characters. So the test uses random CJK characters from U+4E00–U+9FA4 with a fixed seed of 42, at roughly 1.9 tokens per character. Three markers, R7K2, Q9M4 and W3T8, are inserted at three places in the text, and the model must return them in order.

  • Short "OK" prompt, custom catalog, 900 000 window: 57 187 input tokens. This is the overhead of the author's own setup: instructions, rules, and descriptions of tools and skills.
  • Calibration, 30 302 characters, custom catalog: 115 300 tokens, 3 of 3 markers.
  • Large run, 434 302 characters, custom catalog: 890 547 tokens, 3 of 3 markers, 62 s, cached_input_tokens 9 216.
  • Control, same text, server catalog, 828 400 window: 888 330 tokens, 3 of 3 markers, 60 s, no cache.
  • The difference between the last two inputs is 2 217 tokens. The filler is identical; the cause lies in the overhead, which the author did not pin down.

What the window actually controls

The reference describes the field as "Context window tokens available to the active model". Tibo Sotto from the Codex team explained that a larger window lets Codex hold more code, tool output and history before compacting older material. In other words, the number determines when auto-compaction kicks in. A separate parameter, model_auto_compact_token_limit, controls the threshold, and model_auto_compact_token_limit_scope counts the entire active context in total mode and only the growth after the carried-over prefix in body_after_prefix mode.

The real ceiling is listed on the GPT-6.1 Sol page in the API documentation: a window of 1 050 000 tokens, with input capped at 922 000. This is consistent with the September errors. In the API, requests with more than 272 thousand input tokens cost twice as much. According to Sotto (post dated 11.10.2026), subscriptions carry no surcharge for long context on GPT-6.1 Sol, and the default window in Codex was raised from 272 to 500 thousand. The author did not find this in the documentation. He did not measure how much of the subscription limit a 890-thousand-token request consumes.

Custom catalog: what breaks after an update

model_catalog_json replaces the server catalog with a static file, and the author stepped on this himself. In September he raised the limit only for gpt-6-astra. Then gpt-6.1-sol became his main model, and in his copy it kept the old 872 000 and 95%. The bump to 900 000 quietly disappeared, and all his working tasks ran at 828 400. The copy also lacks gpt-6.1-terra, and the default window for Sol there is 272 000 instead of the server's 500 000.

The experimental context management [features.context_management] has been disabled since 12.09.2026: Sotto wrote that the team turned off the opt-in experiment, which could cause early stops or replies to old messages. This affected 4–5 thousand users. For GPT-6.1 Sol, GPT-6.1 Terra and GPT-6 Astra, the catalog has supports_experimental_context: false, and the config flag enables nothing.

The practical takeaway for Codex users: don't chase a million in the config, because what you hit is the server-side max_context_window. To see the real window, read model_context_window from the task log. If you plug in a custom catalog, rebuild it from a fresh models_cache.json after every client update and check the window in a new task. Across the author's 39 working tasks, the largest input was 389 543 tokens, so 828 thousand is more than enough. The next test is a long session running up to auto-compaction: at what volume it triggers with different windows, and how many markers survive compaction.

Key Questions Answered

Where 828 400 comes from?

Codex fetches model parameters from the server and caches them in ~/.codex/models_cache.json. The GPT-6.1 Sol entry contains context_window 500 000 (the default), max_context_window 872 000 (the config cannot raise the window above it), and effective_context_window_percent 95. The result: 872 000 × 0.95 = 828 400. The author did not rely on a single session. From the ~/.codex/sessions logs he took the last 40 tasks: 39 on gpt-6.1-sol and one from the internal codex-auto-review. All 39 token_count events show model_context_window: 828400. The value sits in the info.model_con

What are the key details on The 890-thousand-token test with markers?

Using the model_catalog_json parameter, the author plugged in a copy of the server catalog in which gpt-6.1-sol has max_context_window set to 1 000 000 and the percentage set to 90. That gives 900 000. He took the 10% margin from September probes on GPT-6 Astra: a successful input there was 900 089 tokens, while filler of 909 000 and up ended in an overflow error. The filler has to be token-dense. In September, a text of 1 720 376 characters was stopped by the client itself, which refused to pass a message longer than 1 048 576 characters. So the test uses random CJK charac

What the window actually controls?

The reference describes the field as "Context window tokens available to the active model". Tibo Sotto from the Codex team explained that a larger window lets Codex hold more code, tool output and history before compacting older material. In other words, the number determines when auto-compaction kicks in. A separate parameter, model_auto_compact_token_limit, controls the threshold, and model_auto_compact_token_limit_scope counts the entire active context in total mode and only the growth after the carried-over prefix in body_after_prefix mode. The real ceiling is listed on

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…