Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying.
Your running session filled the context window. Recover it with `/compact` to summarize the transcript and free tokens, or `/new` (fresh task, same CLI session) or `/clear` to start clean. If it fires seconds into a new session, check your config; bad `model_context_window` or `model_auto_compact_token_limit` overrides on a built-in model break auto-compaction. This is the mid-session message, not the single-input limit.
Affected versions: reported CLI v0.80.0 through v0.133.0 and VS Code extension 0.4.49; no fixed-in version
Codex prints this the moment a running session’s history no longer fits the model’s context window. The trigger is accumulation: turns, tool output, and file reads pile up over a long run until they stop fitting, and Codex hard-stops instead of continuing. The generic “one input is too big for a single turn” case lives on a separate page, input exceeds context window. This page covers the runtime string you hit after a long session.
Symptoms
- The exact string shows up mid-session, often hours in. One reporter ran
/goalfor several hours on CLI v0.133.0 with gpt-5.5 before it started firing repeatedly (#24247). - Retrying the same prompt in the same thread throws it again, because the old history is still loaded.
- Some people hit it almost immediately on a fresh session (one question in on CLI v0.80.0, #9046), which points at config rather than accumulation.
- Older IDE builds print slightly different wording, “Start a new conversation…” on VS Code extension 0.4.49 (#7808), versus “Start a new thread…” in the current CLI.
Cause
The running thread’s tokens went past the model’s context window. Codex used to auto-compact (summarize older turns) before hitting the wall; a change reported around June 18 2026 made it hard-stop with this message instead (community thread). Auto-compaction can also just fail to fire during long autonomous runs like /goal (#24247). In one forum case the real cause was broken config: model_context_window and model_auto_compact_token_limit overrides set on a built-in model, where those overrides don’t apply (they only work with custom providers), so compaction never kicked in (auto-compaction thread).
Fix
- Run
/compact. It summarizes the visible conversation to free tokens and lets you keep the task’s context (docs). Best first move when you don’t want to lose your place. - Run
/newto start a fresh task inside the same CLI session, dropping the old history (docs). - Run
/clearto wipe the terminal and start a clean task (docs). - Load less next time. Fewer and smaller file reads, and break a multi-hour
/goalinto staged runs so history has less to accumulate. - If it fires seconds into a new session, audit your config and remove
model_context_window/model_auto_compact_token_limitoverrides unless you’re actually on a custom provider (auto-compaction thread).
Affected versions
Reported on Codex CLI from v0.80.0 (#9046) through v0.133.0 (#24247), and the VS Code extension 0.4.49 (#7808). No release marks it fixed; the hard-stop behavior showed up around mid-June 2026, so it’s not tied to one version.
Facts on this page verified July 15, 2026.
- openai/codex #24247 — error during /goal on CLI v0.133.0, gpt-5.5
- openai/codex #9046 — fires on first question, CLI v0.80.0
- openai/codex #7808 — older 'new conversation' wording, VS Code extension 0.4.49
- OpenAI Community — behavior changed ~June 18 2026 to hard-stop
- OpenAI Community — auto-compaction not triggering (bad config overrides)
- OpenAI Codex docs — developer commands (/new, /compact, /clear)