Repository navigation
Desktop: remote MCP startup timeout blocks creating new conversation #29376
Description
Summary
When Codex Desktop starts a new local conversation/thread, a failing remote MCP server can block thread/start until the UI times out. In my case, an enabled remote MCP server caused thread creation to take about 40s. The UI showed timeout errors and the first message could not be sent. Disabling that MCP server and restarting Codex Desktop immediately fixed new conversation creation.
Environment
- Codex Desktop on macOS
- Codex Desktop version: 26.616.51431 (4212)
- Chromium base: 149.0.7827.115
- Local mode with an existing repo selected
- Remote MCP server configured in
~/.codex/config.toml - The remote MCP URL was
https://stitch.googleapis.com/mcp
Steps to reproduce
- Configure a remote MCP server that is unavailable or slow during auth/discovery/connection.
- Fully restart Codex Desktop.
- Open a new conversation in a local repo.
- Send the first message.
Actual behavior
- The UI shows timeout errors such as:
Error creating task: TimeoutError starting conversation: Timeout
- Local logs show thread startup spending about 40s in the create-thread path before eventually emitting
thread/started. - Representative log characteristics:
thread_start_create_thread duration_ms=40155thread_start_total duration_ms=40161session_init.auth_mcpattempts remote MCP OAuth discovery and fails/times out.
- By the time
thread/startedis emitted, the UI has already timed out and the new conversation is not usable.
Expected behavior
A single optional MCP server should not block the core conversation/thread creation path. If a remote MCP server fails, Codex should degrade gracefully by marking that tool unavailable, loading/retrying it in the background, or using a shorter non-blocking timeout. The thread should still start and the user should still be able to send messages.
Workaround
Commenting out the problematic remote MCP server in ~/.codex/config.toml and restarting Codex Desktop restores new conversation creation.
Why this matters
MCP/connectors are optional extensions. A misconfigured, slow, or unreachable MCP server should not make the main Codex Desktop workflow unusable.
Activity
github-actions commentedon Jun 22, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
TigerHix commentedon Jun 23, 2026
Confirmed. After removing the stale MCP server I can now create chats again.This bug is stupid af
Hello-Mugen commentedon Jun 29, 2026
+1,pls fix, This bug is stupid , and wasting my token!
wherewolf87 commentedon Jul 13, 2026
I captured native Windows app-server trace evidence for the same failure family and filed the sanitized details in #32799.
The verified failing trace was emitted by client version
26.707.31428. After rebooting into the currently installed26.707.8479.0, this exact OAuth-lock timeout has not yet recurred in a controlled observation, so current-build recurrence remains unverified.During a failing
thread/start, the trace enteredsession_init.mcp_manager_init. Six enabled remote MCP clients then failed at approximately the same time with:The shared lock was the Codex MCP OAuth
secrets-store.lock; the user path, server names, request IDs, and credentials were removed from the public report. A later trace showed bothstart_server_task -> initializeandsession_init.auth_mcptiming out after 60 seconds on the same lock during another agent-session initialization.This directly supports keeping optional remote MCP auth off the critical
thread/startpath, or degrading only the affected MCP instead of failing task creation.OrezzerO commentedon Jul 17, 2026
I found a concrete variant of this issue with the first-party
openaiDeveloperDocsMCP on Codex CLI 0.144.5.The
thread/starttimeline showed about 12 seconds insidesession_init.auth_mcpbefore the actual MCP initialize phase. The cause was eager OAuth discovery against an endpoint that is anonymously usable. The discovery path probed the MCP URL and multiple/.well-known/...endpoints, received 405/404 responses, and the sequence plus retry/backoff blocked/new.For this specific anonymous endpoint, the following scoped workaround reduced
/newfrom about 15 seconds to 2.96 seconds while preserving all 5 Docs MCP tools and successfulsearch_openai_docscalls:Why:
codex-rs/rmcp-client/src/auth_status.rsskips OAuth discovery whenauth_status_before_discovery()sees anAuthorizationheader. The public Docs MCP currently tolerates the placeholder header.startup_timeout_sechas no effect becausesession_init.auth_mcpruns beforemcp_manager_init.Full evidence and caveats: #32654 (comment)
This is not a general solution for protected MCP servers. It reinforces the issue's proposed durable fix: optional MCP auth discovery should not block
thread/start; negative discovery should be cached or an explicit no-auth mode should be available.faelp22 commentedon Sep 17, 2026
Additional observation: Codex should probably isolate MCP failures from the conversation lifecycle
Although I was able to fix the immediate problem by updating my own MCP server, I think there is still an important Codex Desktop robustness issue here.
In my case, I had access to the MCP server source code and was able to:
After doing that, Codex stopped freezing and even previously stuck conversations became usable again.
However, most Codex users will not necessarily have control over the MCP server they are using.
The MCP server could be:
In those situations, the Codex Desktop client should ideally protect the main conversation lifecycle from the MCP failure.
The failure mode I observed was approximately:
I think the preferable behavior would be something closer to:
In other words, an external MCP server failure should probably not be able to leave the entire conversation permanently stuck in a streaming/busy state.
Some possible defensive behaviors on the Codex side could be:
streamingif an MCP request fails;This seems especially important because an MCP client cannot assume that every connected MCP server is perfectly implemented or fully up to date.
There is also a related report in #44102 #44590 describing a similar principle: a failing remote MCP server should not block the core Codex Desktop conversation/thread workflow.
In my case, fixing the MCP server solved the immediate problem, but I believe Codex Desktop could still benefit from defensive isolation so the same class of MCP failure does not make the entire chat unusable for users who cannot modify the remote MCP server.
caduosmarini commentedon Sep 28, 2026
Additional Windows Desktop reproduction on Codex 26.924.2738.0 (Windows 11, build 26200, x64).
Enabling a plugin that bundles nine optional remote HTTP MCP servers made new local chats remain at “Starting your task” and show “It is taking longer than normal to start your thread” after the first message. The rest of the desktop experience also became unreliable while these servers initialized.
Sanitized observations from local desktop logs on September 27–28, 2026:
failedstartup-status events: 212not logged inand 145timed out after 30 seconds. There were 87cancelledevents and noreadyevent for these servers. These are log events across multiple threads, not independent connection attempts.failed to read OAuth tokens from keyring: failed to load MCP OAuth tokens from encrypted storage.workspace routing discovery timed out.401withWWW-Authenticate. This makes a simple network outage less likely.An old encrypted MCP token file had been imported into this Windows installation, so a mismatch with local credential storage is plausible, but I have not proven the underlying decryption failure. I also have no trace showing the 60-second secrets-store lock described in #32799; this report is about the user-visible effect of optional MCP authentication/startup failures on chat startup.
Expected: failure of optional MCP servers should mark those integrations unavailable while the chat starts and remains usable. The UI should report the MCP failures without making the whole task appear stuck.
I removed the affected plugin to continue using Codex. I can provide redacted log excerpts privately if maintainers need them. No tokens, private URLs, or local paths are included here.