Repository navigation
ChatGPT Desktop: openaiDeveloperDocs makes thread/resume take 36 seconds #32654
Description
Summary
Enabling the first-party openaiDeveloperDocs streamable-HTTP MCP server makes opening/resuming an existing thread in the ChatGPT desktop app take about 36 seconds. Disabling only that MCP server and restarting the app reduces the same thread's thread/resume RPC to 110 ms.
This is a controlled A/B result on the same machine, app build, and thread. The Browser plugin remained enabled in both runs.
Environment
- ChatGPT Desktop:
26.707.51957(build5175) - Bundled Codex CLI:
0.144.0-alpha.4 - macOS:
26.5.2(build25F84), Apple Silicon - MCP transport: streamable HTTP
- MCP URL:
https://developers.openai.com/mcp
Configuration
Enabled case:
[mcp_servers.openaiDeveloperDocs]
url = "https://developers.openai.com/mcp"
enabled = trueControl case:
[mcp_servers.openaiDeveloperDocs]
url = "https://developers.openai.com/mcp"
enabled = falsebrowser@openai-bundled was installed and enabled in both runs. Its in-app browser backend reached startup_ready in a few milliseconds, so this comparison does not depend on disabling Browser.
Reproduction
-
Add the first-party Docs MCP server:
codex mcp add openaiDeveloperDocs --url https://developers.openai.com/mcp
-
Ensure
enabled = trueformcp_servers.openaiDeveloperDocsin~/.codex/config.toml. -
Quit and relaunch ChatGPT Desktop.
-
Open an existing local Codex/ChatGPT thread.
-
Inspect the Desktop log for
method=thread/resume. -
Set only
mcp_servers.openaiDeveloperDocs.enabled = false, quit and relaunch the app, then open the same thread again.
Actual result
With openaiDeveloperDocs enabled, the log recorded:
2026-07-12T22:33:49.667Z maybe_resume_started
2026-07-12T22:33:49.673Z method=thread/read durationMs=3 errorCode=null
2026-07-12T22:34:25.933Z method=thread/resume durationMs=36233 errorCode=null
With only openaiDeveloperDocs disabled, after a full app restart, the same thread recorded:
2026-07-12T22:38:53.446Z maybe_resume_started
2026-07-12T22:38:53.455Z method=thread/read durationMs=5 errorCode=null
2026-07-12T22:38:54.847Z method=thread/resume durationMs=110 errorCode=null
That is a change from 36,233 ms to 110 ms (about 329× faster) with no thread/resume error in either run.
I also observed other existing threads taking 36,260 ms and 40,923 ms to resume while the Docs MCP was enabled.
Expected result
Opening or switching to an existing thread should not synchronously wait tens of seconds for a read-only, remote documentation MCP server. thread/resume should remain responsive when the Docs MCP is enabled.
Impact
The app is practically unusable for switching between existing chats when openaiDeveloperDocs is enabled. Disabling the MCP restores normal resume performance, but removes the first-party Docs MCP functionality.
Request
Please investigate the thread/resume / MCP lifecycle in the desktop app. Possible fixes include reusing the MCP connection, initializing the Docs MCP lazily or asynchronously, and exposing a timing breakdown for MCP initialization during thread/resume.
Related reports
- openaiDeveloperDocs MCP intermittently fails during initialized notification #21535
- Codex Desktop repeatedly starts full MCP stacks for new sessions/subagents, causing severe slowdown and memory pressure #18333
- Bundled
openai-docsskill instructs agents to use Docs MCP even though it is not configured by default #24239
Activity
github-actions commentedon Jul 12, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
shurgalin commentedon Jul 13, 2026
Update — reproduced after updating the desktop app.
Environment:
With
openaiDeveloperDocsenabled, I restarted the app and opened an existing local thread. The log recorded:So the issue still reproduces on the newer build (14.8 seconds). This is lower than the prior ~36 seconds, but still makes switching to an existing chat unusable.
Additional context: in the same startup,
app/listtook 13,404 ms and a latermcpServerStatus/listtook 16,184 ms. This may indicate a broader initialization/lifecycle bottleneck rather than a Docs-MCP request itself.After I disabled the Docs MCP, switching to another existing thread in the running app took 55 ms. I am not treating that last comparison as a fresh-restart A/B; the controlled restarted A/B remains in the original report.
OrezzerO commentedon Jul 17, 2026
I reproduced this on Codex CLI 0.144.5 and found a working scoped workaround that keeps
openaiDeveloperDocsenabled.Workaround
After restarting Codex,
/newwent from about 15 seconds to about 3 seconds, while the Docs MCP still exposed all 5 tools. I also successfully calledsearch_openai_docsafter the change (37 results forCodex MCP configuration).Controlled timing from
logs_2.sqlite:thread/startat14:05:16.516;session_init.auth_mcpdid not finish until about14:05:28.697; Docs MCP tools were ready at14:05:31.534.thread/startat14:12:38.616; the Docs MCP 5-tool list was available at14:12:41.573(about 2.96 seconds total).Why it works
The delay is not primarily the Docs MCP initialize request. It occurs earlier in
session_init.auth_mcp.For a streamable HTTP MCP with no configured credential source, Codex calls
compute_auth_statuses(), thendetermine_streamable_http_auth_status(). The latter performs eager OAuth discovery before MCP initialization. Forhttps://developers.openai.com/mcp, that negative discovery path probes the MCP URL and several/.well-known/...endpoints. The endpoint is anonymously usable, but the probes return responses such as 405/404 and the discovery sequence plus retry/backoff takes about 12 seconds.Relevant current source paths:
codex-rs/core/src/session/session.rs:session_init.auth_mcpawaitscompute_auth_statuses()as part ofthread/start.codex-rs/rmcp-client/src/auth_status.rs:auth_status_before_discovery()skips discovery when eitherbearer_token_env_varis configured or the default headers containAuthorization.rmcp::transport::AuthorizationManager.The static header therefore tells Codex that a bearer credential source is already configured, which bypasses OAuth capability discovery. The public Docs MCP currently tolerates this placeholder header and continues to serve anonymous requests.
startup_timeout_secdoes not help here because the delay happens insession_init.auth_mcp, beforemcp_manager_init. Disablingshell_snapshotalso has no effect.Scope / caveat
This is a workaround, not the ideal client fix. It should only be used for an MCP endpoint that is known to work anonymously and tolerates this placeholder header. It should not be used to bypass authentication on a protected MCP server.
The durable fix would be to avoid putting negative OAuth discovery for optional MCP servers on the synchronous
thread/start/thread/resumepath, or cache a negative discovery result. A first-classauth = "none"setting would also avoid using a placeholder header.shurgalin commentedon Jul 21, 2026
Closing as completed: I verified the original user-visible regression is fixed in the current desktop build.
Environment:
openaiDeveloperDocsenabledAfter restarting the app, four existing threads resumed with
thread/resumetimings of 64 ms, 89 ms, 330 ms, and 344 ms. The previously affected thread resumed in 89 ms, and a Docs MCP search succeeded.One switch to the affected thread took about 5.85 seconds wall-clock, but the
thread/resumeRPC itself was 89 ms; the delay was outside that RPC while unrelated backgroundapp/listandmcpServer/resource/readrequests were in flight. I do not treat that as a recurrence of this report's synchronousthread/resumeregression.This matches the intended fix in #32825: avoid blocking thread startup on MCP OAuth discovery. If the remaining background delay becomes reproducible and user-visible, it should be tracked separately.