Codex reports "Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying."
OpenAI Developer Community
June 21, 2026
I’m using the Codex app on Windows 11 and have kept it updated to the latest version. It had been working fine until around three days ago.
Since then, whenever the context window of a session becomes full, Codex reports the following error instead of automatically compacting the context:
Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying.
This seems different from the previous behavior, where Codex would automatically compact the context and continue the session.
Below is my config.toml:
model_provider = "openai_https"
model = "gpt-5.5"
model_reasoning_effort = "high"
approval_policy = "on-request"
sandbox_mode = "workspace-write"
service_tier = "default"
notify = \[ "C:\\Users\\vlsi\\AppData\\Local\\OpenAI\\Codex\\runtimes\\cua_node\\1b23c930bdf84ed6\\bin\\node_modules\\@oai\\sky\\bin\\windows\\codex-computer-use.exe", "turn-ended" \]
\[marketplaces.openai-bundled\]
last_updated = "2026-06-21T05:07:45Z"
source_type = "local"
source = '\\?\\C:\\Users\\vlsi.codex.tmp\\bundled-marketplaces\\openai-bundled'
\[marketplaces.openai-primary-runtime\]
last_updated = "2026-06-20T06:59:18Z"
source_type = "local"
source = '\\?\\C:\\Users\\vlsi.cache\\codex-runtimes\\codex-primary-runtime\\plugins\\openai-primary-runtime'
\[plugins."documents@openai-primary-runtime"\]
enabled = true
\[plugins."spreadsheets@openai-primary-runtime"\]
enabled = true
\[plugins."presentations@openai-primary-runtime"\]
enabled = true
\[plugins."pdf@openai-primary-runtime"\]
enabled = true
\[plugins."browser@openai-bundled"\]
enabled = true
\[windows\]
sandbox = "elevated"
\[projects.'d:\\dev\\coding\\sta-explorer'\]
trust_level = "trusted"
\[projects.'d:\\dev\\coding\\sta-manager'\]
trust_level = "trusted"
\[projects.'d:\\dev\\coding\\rtl-coding'\]
trust_level = "trusted"
\[projects.'c:\\users\\vlsi\\documents\\codex\\2026-05-14\\skill-rtl-spec-vcs-debug'\]
trust_level = "trusted"
\[projects.'d:\\dev\\coding\\learn-and-create-knowledge'\]
trust_level = "trusted"
\[projects.'d:\\dev\\coding\\learn-and-create-knowledge\\skill-create-and-test'\]
trust_level = "trusted"
\[projects.'c:\\users\\vlsi\\documents\\codex\\2026-05-19\\git-repo'\]
trust_level = "trusted"
\[projects.'c:\\users\\vlsi\\documents\\codex\\2026-05-23\\vmware-workstation-17-6-rhel8-10'\]
trust_level = "trusted"
\[projects.'c:\\users\\vlsi\\documents\\codex\\2026-05-23\\codex-asic-rtl-spec-rtl-sv'\]
trust_level = "trusted"
\[projects.'c:\\users\\vlsi\\documents\\codex\\2026-05-29\\codex-ssh-linux-skills-skill'\]
trust_level = "trusted"
\[projects.'c:\\users\\vlsi\\documents\\codex\\2026-05-31\\forrestchang-andrej-karpathy-skills-https-github'\]
trust_level = "trusted"
\[projects.'c:\\users\\vlsi\\documents\\codex\\2026-06-01\\vmware-workstation-17-pro-rhel-8'\]
trust_level = "trusted"
\[projects.'d:\\dev\\coding\\skill-dev\\wavedrom-writter'\]
trust_level = "trusted"
\[projects.'d:\\dev\\coding\\skill-dev\\wavedrom-test'\]
trust_level = "trusted"
\[projects.'c:\\users\\vlsi\\documents\\codex\\2026-06-04\\uvm-1-2-2-0'\]
trust_level = "trusted"
\[projects.'d:\\dev\\coding\\chat'\]
trust_level = "trusted"
\[projects.'d:\\dev\\coding\\chat-for-scripts'\]
trust_level = "trusted"
\[model_providers.openai_https\]
name = "OpenAI"
wire_api = "responses"
requires_openai_auth = true
supports_websockets = false
\[desktop\]
ambient-suggestions-enabled = true
appearanceTheme = "dark"
conversationDetailMode = "STEPS_COMMANDS"
show-context-window-usage = true
\[features\]
js_repl = false
memories = false
chronicle = false
\[mcp_servers.node_repl\]
args = [ ]
command = 'C:\\Users\\vlsi\\AppData\\Local\\OpenAI\\Codex\\runtimes\\cua_node...\\bin\\node_repl.exe'
startup_timeout_sec = 120
\[mcp_servers.node_repl.env\]
NODE_REPL_NATIVE_PIPE_CONNECT_TIMEOUT_MS = "1000"
NODE_REPL_NODE_MODULE_DIRS = 'C:\\Users\\vlsi\\AppData\\Local\\OpenAI\\Codex\\runtimes\\cua_node...\\bin\\node_modules'
NODE_REPL_NODE_PATH = 'C:\\Users\\vlsi\\AppData\\Local\\OpenAI\\Codex\\runtimes\\cua_node...\\bin\\node.exe'
NODE_REPL_TRUSTED_CODE_PATHS = 'C:\\Users\\vlsi.codex'
CODEX_HOME = 'C:\\Users\\vlsi.codex'
NODE_REPL_TRUSTED_BROWSER_CLIENT_SHA256S = "..."
BROWSER_USE_AVAILABLE_BACKENDS = "chrome,iab"
NODE_REPL_INSTRUCTIONS_USE_CASE_BROWSER = "Control the in-app browser in conjunction with the Browser Plugin."
NODE_REPL_INSTRUCTIONS_USE_CASE_CHROME = "Control the Chrome browser in conjunction with the Chrome Plugin. Prefer this method of controlling Chrome over alternatives (such as Computer Use) unless the user explicitly mentions an alternative."
BROWSER_USE_CODEX_APP_BUILD_FLAVOR = "prod"
BROWSER_USE_CODEX_APP_VERSION = "26.616.51431"
SKY_CUA_NATIVE_PIPE = "1"
SKY_CUA_NATIVE_PIPE_DIRECTORY = '\\.\\pipe\\codex-computer-use-...'
CODEX_CLI_PATH = 'C:\\Users\\vlsi\\AppData\\Local\\OpenAI\\Codex\\bin...\\codex.exe'
\[memories\]
generate_memories = false
use_memories = false
Discussion in the ATmosphere