OpenAI Codex CLI
Codex CLI errors and fixes
14 Codex CLI error messages, quoted verbatim, each with what it means, why it happens and the fix documented in official docs, maintainer replies or release notes. Verified .
All Codex CLI errors
- Status: Fixed in release7 fixed in release
- Status: Workaround4 workaround
- Status: By design1 by design
- Status: Open2 open
stream disconnected before completion: stream closed before response.completedThe response stream (SSE) from the model disconnected after the HTTP handshake succeeded but before the server emitted response.completed. Per the Codex source, the session loop treats this as a transient error and automatically retries the turn; the TUI shows retry attempts before giving up. The retry count for SSE streaming interruptions is model_providers.<id>.stream_max_retries (default: 5) and the idle timeout is stream_idle_timeout_ms (default: 300000).Status: Workaroundstream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses)Codex could not send the request to the Codex responses endpoint at all, so it shows "Reconnecting" and fails after its retry attempts.Status: OpenError running remote compact task: stream disconnected before completion: error sending request for url (https://chatgpt.com/backend-api/codex/responses/compact)Automatic or manual compaction of a long thread failed while calling the separate remote compaction endpoint. Reporters said the session became unusable afterwards.Status: Fixed in releaseSelected model is at capacity. Please try a different model.Maintainer etraut-openai (#19583): this does not mean you are rate limited or out of usage; it means OpenAI is running low on capacity to serve this model in your region.Status: By designYour access token could not be refreshed because your refresh token was already used. Please log out and sign in again.Codex tried to refresh your ChatGPT sign-in, but the refresh token had already been consumed, so the session cannot authenticate until you sign in again.Status: Fixed in releaseCodex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying.The conversation plus tool output no longer fits in the model's context window. Older builds said "Start a new conversation or clear earlier history before retrying." The server-side error behind it reads "Your input exceeds the context window of this model. Please adjust your input and try again."Status: Fixed in releaseError logging in: Port 127.0.0.1:1455 is already in usecodex login could not start its local OAuth callback server, which listens on localhost:1455 by default, so the browser sign-in cannot return credentials to the CLI. It may be preceded by "Failed to cancel previous login server: connection timed out".Status: WorkaroundToken exchange failed: token endpoint returned status 403 ForbiddenThe browser sign-in reached the local callback, but exchanging the authorization code at the OpenAI token endpoint was rejected, so codex login did not finish. A related variant is "Token exchange failed: error sending request for url (https://auth.openai.com/oauth/token)" (#5283).Status: WorkaroundMCP client for `playwright` failed to start: program not foundCodex could not find the executable named in the MCP server's command, so the server never started.Status: Fixed in releaseMCP client for `X` failed to start: handshaking with MCP server failed: connection closed: initialize responseCodex started or connected to the MCP server, but the connection closed before the server answered the MCP initialize request.Status: OpenMCP client for `<server>` timed out after 10 seconds. Add or adjust `startup_timeout_sec` in your config.toml:The MCP server did not finish starting within its startup timeout (default 10 seconds). Builds before 0.50.0 showed this as a generic "request timed out" startup failure (#2555); PR #5595 added the clearer message so users can self-serve.Status: WorkaroundTo use Codex with your ChatGPT plan, upgrade to Plus: https://chatgpt.com/explore/plus.Codex believes your signed-in ChatGPT plan does not include Codex. Older builds linked to https://openai.com/chatgpt/pricing. Paid users seeing it were hitting a misreported plan.Status: Fixed in releaseCodex process errored: Codex process is not availableThe Codex IDE extension (VS Code) could not talk to its underlying codex app-server process; the output log showed "unable to parse stdout from codex app-server: SyntaxError: Unexpected end of JSON input".Status: Fixed in releaseError starting conversationThe Codex VS Code extension failed as soon as a new chat was started, before any code was involved.Status: Fixed in release
New to Codex CLI? Start with Codex CLI in the tools directory.
Newsletter
Fixes for the tools you use, weekly
One email per week. New coding agent releases, what broke, and how developers are working around it.