Skip to content

ChatGPT Desktop: openaiDeveloperDocs makes thread/resume take 36 seconds #32654

Closed

Description

@shurgalin

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 (build 5175)
  • Bundled Codex CLI: 0.144.0-alpha.4
  • macOS: 26.5.2 (build 25F84), 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 = true

Control case:

[mcp_servers.openaiDeveloperDocs]
url = "https://developers.openai.com/mcp"
enabled = false

browser@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

  1. Add the first-party Docs MCP server:

    codex mcp add openaiDeveloperDocs --url https://developers.openai.com/mcp
  2. Ensure enabled = true for mcp_servers.openaiDeveloperDocs in ~/.codex/config.toml.

  3. Quit and relaunch ChatGPT Desktop.

  4. Open an existing local Codex/ChatGPT thread.

  5. Inspect the Desktop log for method=thread/resume.

  6. 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

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    mcpIssues related to the use of model context protocol (MCP) servers
    app-serverIssues involving app server protocol or interfaces
    on Jul 12, 2026
  2. github-actions commented on Jul 12, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. shurgalin commented on Jul 13, 2026

    @shurgalin
    Author

    Update — reproduced after updating the desktop app.

    Environment:

    • ChatGPT Desktop 26.707.62119 (build 5211)
    • bundled app-server 0.144.2
    • macOS 26.5.2 (25F84), Apple Silicon

    With openaiDeveloperDocs enabled, I restarted the app and opened an existing local thread. The log recorded:

    2026-07-13T08:30:58.479Z maybe_resume_started
    2026-07-13T08:30:58.485Z method=thread/read durationMs=3
    2026-07-13T08:31:13.323Z method=thread/resume durationMs=14811 errorCode=null
    

    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/list took 13,404 ms and a later mcpServerStatus/list took 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.

  4. OrezzerO commented on Jul 17, 2026

    @OrezzerO

    I reproduced this on Codex CLI 0.144.5 and found a working scoped workaround that keeps openaiDeveloperDocs enabled.

    Workaround

    [mcp_servers.openaiDeveloperDocs]
    url = "https://developers.openai.com/mcp"
    http_headers = { Authorization = "Bearer anonymous" }

    After restarting Codex, /new went from about 15 seconds to about 3 seconds, while the Docs MCP still exposed all 5 tools. I also successfully called search_openai_docs after the change (37 results for Codex MCP configuration).

    Controlled timing from logs_2.sqlite:

    • Before: thread/start at 14:05:16.516; session_init.auth_mcp did not finish until about 14:05:28.697; Docs MCP tools were ready at 14:05:31.534.
    • With the config above: thread/start at 14:12:38.616; the Docs MCP 5-tool list was available at 14: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(), then determine_streamable_http_auth_status(). The latter performs eager OAuth discovery before MCP initialization. For https://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_mcp awaits compute_auth_statuses() as part of thread/start.
    • codex-rs/rmcp-client/src/auth_status.rs: auth_status_before_discovery() skips discovery when either bearer_token_env_var is configured or the default headers contain Authorization.
    • The same file delegates discovery to 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_sec does not help here because the delay happens in session_init.auth_mcp, before mcp_manager_init. Disabling shell_snapshot also 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/resume path, or cache a negative discovery result. A first-class auth = "none" setting would also avoid using a placeholder header.

  5. shurgalin commented on Jul 21, 2026

    @shurgalin
    Author

    Closing as completed: I verified the original user-visible regression is fixed in the current desktop build.

    Environment:

    • ChatGPT Desktop 26.715.70719 (build 5650)
    • bundled app-server 0.145.0-alpha.27
    • macOS 26.5.2 (25F84), Apple Silicon
    • openaiDeveloperDocs enabled

    After restarting the app, four existing threads resumed with thread/resume timings 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/resume RPC itself was 89 ms; the delay was outside that RPC while unrelated background app/list and mcpServer/resource/read requests were in flight. I do not treat that as a recurrence of this report's synchronous thread/resume regression.

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serversperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions