DEV Community

LucioLiu
LucioLiu

Posted on

Codex Can Use a 1M-Token Context Window, but the Default Is Smaller for a Reason

The most useful detail in the 1-million-token Codex discussion is not the size of the window. It is the second number: 900,000.

Tibo from the OpenAI Codex team shared the following configuration in the original post:

model_context_window = 1000000
model_auto_compact_token_limit = 900000
Enter fullscreen mode Exit fullscreen mode

The first line requests a one-million-token context window. The second tells Codex to compact before the context is completely full. That 100,000-token gap is operational headroom for the next model response, tool output, and internal bookkeeping. Filling a context to its advertised maximum and only then asking the system to recover is a fragile strategy.

Source-side signal, not our performance: the public snapshot of Tibo’s post showed approximately 2,191,001 views, 12,765 likes, 999 reposts, 882 replies, 10,997 bookmarks, and 408 quotes. A separate window-time repost helped surface it, but those engagement numbers belong to the original source post. They do not measure our account or prove that every viewer enabled the setting.

Tibo also said the default was chosen after cost and performance tuning. OpenAI’s GPT-5.6 page describes long-context evaluation in the 512K-to-1M range, while the source post identifies GPT-5.6 Sol’s documented context as 1,050,000 tokens. Availability still depends on a Codex version and model that support the option. This should not be presented as a universal switch for every account, model, or older installation.

Before enabling it, check what problem you are solving.

A larger window can help when one task genuinely needs a broad codebase slice, long execution history, or several large artifacts at once. It is less useful when the session contains duplicated logs, obsolete plans, generated files, or entire directories that should have been excluded. More context does not make irrelevant context free.

Then make the change observable. Record the Codex version, selected model, effective configuration, prompt size, compaction events, latency, and task outcome. Compare a few representative tasks with the default rather than judging the setting from one impressive session. I have not run that comparison, so there is no benchmark claim here.

Change one variable at a time. Keep the model, repository revision, task, and allowed tools fixed while comparing the default window with the larger one. If the run improves, you can attribute the difference more carefully; if it fails, the trace is still interpretable.

Keep durable state outside the window. Decisions, commands, accepted constraints, and unfinished work should live in repository files or another deliberate store. A million tokens delay compaction; they do not turn a transient conversation into reliable project memory.

Finally, treat context as a data boundary. A larger window makes it easier to include more files, but that can also pull in secrets, generated dumps, personal data, or irrelevant vendor code. Review ignore rules and the actual files the agent can read before expanding the budget.

The configuration is valuable because it exposes a real tradeoff. You can give Codex more working space, but you also accept more input cost, more room for noise, and a larger surface to govern. The 900,000-token compaction threshold is the clue: even a very large context still needs an exit strategy.

Sources

AI-assistance disclosure: AI was used to help structure and edit this article. The configuration, limits, and source-side engagement figures were checked against the cited material. I have not benchmarked the one-million-token setting, and no performance or cost improvement is claimed.

Top comments (0)