The request is limited by quota or account entitlement. Verify the sign-in method, account and usage window.
How to fix it
Check the active account, workspace, and 5-hour/weekly reset times on the usage page.
If quota still appears available, save progress and sign in again to the correct account. If the mismatch persists, keep a redacted screenshot and timestamp.
API keys use OpenAI Platform billing and limits, not the Codex allowance in a ChatGPT plan. Custom providers may have their own rules.
Check sign-in status
codex login status
Re-authenticate an expired ChatGPT sign-in
codex logout
codex login
This signs you out; save your task first. API key users should check the key and endpoint first.
OAuth falls back to dummy
Authentication
401 Unauthorized: Incorrect API key provided: dummy
For ChatGPT sign-in, this matches a reported OAuth state issue, especially after changing networks.
How to fix it
Confirm the sign-in method. ChatGPT users should re-authenticate first; dummy alone is no reason to create an API key.
For a custom provider or API key, inspect provider authentication; dummy may also be a local placeholder.
Check sign-in status
codex login status
Re-authenticate an expired ChatGPT sign-in
codex logout
codex login
This signs you out; save your task first. API key users should check the key and endpoint first.
Authentication failed · 401
Authentication
401 Unauthorized
Credentials may have expired, the account may be wrong, or the request may target the wrong provider.
How to fix it
Check sign-in status and the target provider. Confirm whether you use ChatGPT sign-in or an API key.
ChatGPT users can save progress, sign out and sign in again. API key users should check key status, organization and endpoint.
API keys use OpenAI Platform billing and limits, not the Codex allowance in a ChatGPT plan. Custom providers may have their own rules.
Check sign-in status
codex login status
Re-authenticate an expired ChatGPT sign-in
codex logout
codex login
This signs you out; save your task first. API key users should check the key and endpoint first.
Reconnecting or stream interrupted
Network & transport
Reconnecting... 1/5
stream disconnected before completion
Network, proxy, client or service issues can interrupt a connection. Reconnecting alone does not identify the cause.
How to fix it
Run Doctor; check VPN, proxy, DNS, firewall and custom CAs. Compare using a phone hotspot.
Compare CLI and Desktop with the same account and network. If both fail, check service status and custom providers.
Check connectivity and installation
codex doctor --summary
Requires Codex CLI. If an older version lacks Doctor, check codex --help first.
Codex may still be using an old endpoint override, or the local proxy may not be running.
How to fix it
Inspect openai_base_url, model_provider and the provider base_url in the active user configuration.
Confirm the endpoint and listener are still needed. Back up config, correct stale overrides and restart. Remove keys and private URLs before sharing config.
macOS / Linux · CODEX_HOME
printenv CODEX_HOME
If CODEX_HOME is unset, the default is .codex in your user home directory.
Windows · PowerShell · CODEX_HOME
$env:CODEX_HOME
Context window full
Context
Context window exceeded.
Codex ran out of room in the model's context window.
The thread, images or tool output use too much context. Compaction may also fail in a full thread.
How to fix it
Start a new thread from a saved handoff. Verify repository state before continuing unfinished steps.
Update docs/codex-handoff.md at milestones, limit tool output and put durable rules in AGENTS.md.
Compaction failed
Context
Error running remote compact task
The context compaction request failed. Check the same log section for a specific error such as server_overloaded, context_window_exceeded or a connection timeout.
How to fix it
Look for server_overloaded, context_window_exceeded or connection errors in the same log section and follow those checks.
Update the client. If the old thread remains stuck, resume in a new thread from the repository and handoff instead of repeating /compact.
Sandbox file or network access
Sandbox & Git
Permission denied / Read-only file system
Writable directories, command network access and approvals are separate settings. OS file permissions may also apply.
How to fix it
Check /permissions and the working directory. Confirm the target file is within the writable roots.
If chat works but dependency installation or curl fails, check command network_access. Change only permissions the task needs.
Check permissions inside Codex CLI
/permissions
Git metadata write denied
Sandbox & Git
fatal: Unable to create '.git/worktrees/feature/index.lock': Permission denied
.git and a worktree’s linked Git directory may be protected as read-only even when project files are writable.
How to fix it
Inspect the repository root, worktrees and Git status. Check whether the failing path is Git metadata.
After editing and testing, use permitted approval for the specific Git operation or commit in your own terminal. Deleting a lock does not fix permissions.
Check repository state
git rev-parse --show-toplevel
git status --short
git worktree list
Git lock already exists
Sandbox & Git
fatal: Unable to create '.git/index.lock': File exists. Another git process seems to be running.
Another Git process may be using the repository, or an interrupted process may have left a lock.
How to fix it
Check IDEs, Git clients and terminals for unfinished Git operations. Wait for them to complete first.
Only handle the specific lock manually after confirming no Git process is active and the lock is stale. Never delete the whole .git directory.
Check repository state
git rev-parse --show-toplevel
git status --short
git worktree list
MCP tool or authentication error
MCP
Mcp error: -32603: Internal error
-32603 is a generic internal error, not proof of expired OAuth. If several tools fail together, check authentication first.
How to fix it
Check whether the MCP server is enabled, its tools and auth status. For OAuth servers, try mcp login again.
If it still fails, inspect required environment variables, processes and server logs, then the protocol. Codex account sign-in is separate from MCP sign-in.
List MCP servers
codex mcp list
Re-authenticate MCP OAuth
codex mcp login SERVER_NAME
Replace SERVER_NAME with a configured server name. Only for OAuth servers.
Config changes not applied
Client & configuration
You may have edited the wrong CODEX_HOME, the project may be untrusted, or a higher-priority layer may override the setting.
How to fix it
Check /status, CODEX_HOME, CLI flags and the selected profile. Project config loads only in trusted projects.
If only one client fails with the same account, network and prompt, investigate that client first.
How to fix it
Fully quit and reopen the affected client. Update it and test a fresh thread.
Record the CLI comparison, client version and timestamp. For an unresponsive Windows extension, check native runtimes.
Check connectivity and installation
codex doctor --summary
Requires Codex CLI. If an older version lacks Doctor, check codex --help first.
Windows sandbox or runtime
Client & configuration
Windows sandbox setup failed / VCRUNTIME140.dll missing
For sandbox startup failures, inspect .sandbox/sandbox.log. If an extension reports a missing DLL, check whether the C++ runtime is installed.
How to fix it
For sandbox startup failures, restart Codex and follow official guidance for elevated/unelevated modes and .sandbox/sandbox.log.
For an unresponsive extension or missing DLL, check C++ Build Tools and the x64 Redistributable. Do not share .sandbox-secrets.
Check connectivity and installation
codex doctor --summary
Requires Codex CLI. If an older version lacks Doctor, check codex --help first.
Cloud setup vs agent phase
Project workflow
Setup network access and secrets do not automatically carry over to the agent phase. Variables exported in setup do not automatically reach the agent shell either.
How to fix it
Setup can access the internet to install dependencies. Agent internet access is off by default; enable it as needed in environment settings.
Secrets are setup-only. A normal export does not persist across shells. Configure non-sensitive variables in the environment; never persist secrets in the repository.