Codex Desktop codex_apps MCP handshake times out while direct wham/apps calls succeed

Open 💬 4 comments Opened May 27, 2026 by haoofun

Codex Desktop codex_apps MCP handshake times out, while direct wham/apps calls with the same token succeed

Summary

Codex Desktop cannot invoke Gmail/GitHub connector tools through the built-in mcp__codex_apps__... tool path. Every connector call fails immediately with:

tool call error: failed to get client

Caused by:
    MCP startup failed: timed out handshaking with MCP server after 30s

This appears to be a Codex Desktop codex_apps MCP client/handshake issue, not a connector authorization issue. Using the same Codex ChatGPT auth token, direct JSON-RPC calls to https://chatgpt.com/backend-api/wham/apps succeed.

Environment

  • OS: macOS 26.5, build 25F71
  • Codex Desktop app bundle version: 26.519.81530
  • Codex app version seen in logs: 0.133.0
  • Model in affected Codex turns: gpt-5.5
  • Reasoning effort in affected Codex turns: high
  • Auth mode: ChatGPT
  • Affected connectors:
  • Gmail: connector_2128aebfecb84f64a069897515042a44
  • GitHub: connector_76869538009648d5b282a4bb21c3d157
  • Plugins enabled in ~/.codex/config.toml:
  • gmail@openai-curated
  • github@openai-curated
  • Reinstalling the latest Codex Desktop did not fix the issue.
  • Recreating/rebuilding ~/.codex state did not fix the issue.

Reproduction

  1. Install/login to Codex Desktop with ChatGPT auth.
  2. Enable/install Gmail and GitHub connectors.
  3. Authorize the connectors successfully through the browser flow.
  4. Start a Codex Desktop thread.
  5. Ask Codex to call a read-only connector tool, for example:
  • Gmail get_profile
  • GitHub list_user_orgs

Actual Behavior

Both connector calls fail through Codex Desktop's built-in tool path:

tool call error: failed to get client

Caused by:
    MCP startup failed: timed out handshaking with MCP server after 30s

Log excerpt:

tool_name=mcp__codex_apps__gmail_get_profile
success=false
output=Wall time: 0.0051 seconds
Output:
[{"type":"text","text":"tool call error: failed to get client\n\nCaused by:\n    MCP startup failed: timed out handshaking with MCP server after 30s"}]
mcp_server=codex_apps
mcp_server_origin=https://chatgpt.com
app.version=0.133.0
auth_mode="Chatgpt"
originator=Codex_Desktop
model=gpt-5.5
slug=gpt-5.5

Expected Behavior

Codex Desktop should initialize the codex_apps MCP server and invoke Gmail/GitHub connector tools successfully.

Evidence That Connector Auth And Backend Work

Using the same Codex auth token from the local Codex session, direct requests to the remote MCP endpoint succeed.

Endpoint:

POST https://chatgpt.com/backend-api/wham/apps

Results:

initialize: HTTP 200
serverInfo.name: codex-connectors-mcp
serverInfo.version: 0.1.0
tools/list: HTTP 200
tool_count: 111
first_tool.name: github_add_comment_to_issue
tools/call gmail_get_profile: HTTP 200
isError: false
returns the Gmail profile for the connected account
tools/call github_list_user_orgs: HTTP 200
isError: false
returns {"orgs": []}

This suggests:

  • The wham/apps backend is reachable.
  • The Codex ChatGPT auth token is valid.
  • The token has connector scopes.
  • Gmail and GitHub connector links exist and can be invoked.
  • The failure is specific to Codex Desktop's built-in codex_apps MCP client/handshake path.

Additional Local State

The plugin app manifests point to the expected connector IDs:

{
  "apps": {
    "github": {
      "id": "connector_76869538009648d5b282a4bb21c3d157"
    }
  }
}
{
  "apps": {
    "gmail": {
      "id": "connector_2128aebfecb84f64a069897515042a44"
    }
  }
}

The local codex_apps_tools cache contains 111 tools, including 90 GitHub tools and 21 Gmail tools, matching the successful direct tools/list result.

Related Issues

This looks similar to:

  • #16550
  • #20167
  • #21995
  • #16360

The closest match appears to be #16550: the endpoint is directly reachable and usable, but Codex's RMCP streamable HTTP handshake path fails.

View original on GitHub ↗

4 Comments

hongjieh · 2 months ago

Adding another reproduction from Codex Desktop with a newer build. This looks like the same codex_apps MCP client failure mode, but in my case a full Codex Desktop restart restored the same connectors without any connector re-auth.

Environment:

  • Codex Desktop bundle version: 26.527.60818
  • Codex CLI/runtime version from codex doctor --json: 0.136.0-alpha.2
  • OS: macOS 26.3.0, arm64
  • Auth mode: ChatGPT
  • Affected connectors observed: Gmail and Figma

Failure symptoms before restart:

  • Gmail _get_profile and list_labels failed.
  • Figma _whoami failed with the same error.
  • This was not Gmail-specific; the failure happened before the call reached the Gmail/Figma connector APIs.

Error returned by both connectors:

tool call error: failed to get client

Caused by:
    MCP startup failed: handshaking with MCP server failed: Send message error Transport [rmcp::transport::worker::WorkerTransport<rmcp::transport::streamable_http_client::StreamableHttpClientWorker<codex_rmcp_client::http_client_adapter::StreamableHttpClientAdapter>>] error: Transport channel closed, when send initialized notification

Relevant local log pattern from ~/.codex/logs_2.sqlite on 2026-06-02 Asia/Shanghai:

codex_mcp::rmcp_client: MCP startup failed: timed out handshaking with MCP server after 30s
codex_mcp::rmcp_client: MCP startup failed: Transport channel closed, when send initialized notification
codex_mcp::rmcp_client: HTTP request failed for https://chatgpt.com/backend-api/wham/apps, when send initialize request

Additional checks while broken:

  • Browser Gmail was usable, so the Gmail account/mailbox itself was fine.
  • curl -I -L --max-time 10 https://chatgpt.com/backend-api/wham/apps returned HTTP/2 405 with Allow: POST, so basic endpoint reachability existed.
  • Connector tool definitions were still visible/cached, but every actual codex_apps call failed at MCP client acquisition/startup.

After restarting Codex Desktop:

mcp__codex_apps__gmail_get_profile success=true duration_ms=2533
mcp__codex_apps__figma_whoami success=true

codex doctor --json after restart showed ChatGPT provider reachability and WebSocket reachability OK. It had an unrelated optional warning for openaiDeveloperDocs: https://developers.openai.com/mcp timing out, but codex_apps calls were healthy after restart.

Expected fix:

Codex Desktop should invalidate/recreate/reconnect the broken codex_apps MCP client/session after handshake/startup failure instead of requiring a full desktop app restart. It would also help if cached app tools were not presented as usable while the underlying MCP client cannot be acquired.

mikhailnezhnikov-pixel · 2 months ago

Adding another reproduction from Codex Desktop on Windows. This appears to affect codex_apps MCP app connectors broadly, not only Google Drive.

Environment:

  • OS: Windows
  • Codex Desktop package: OpenAI.Codex_26.601.2237.0_x64
  • Codex app/runtime version seen in logs: 0.136.0-alpha.2
  • Auth mode: ChatGPT
  • Model: gpt-5.5
  • MCP server: codex_apps

Enabled plugins in ~/.codex/config.toml:

  • gmail@openai-curated
  • slack@openai-curated
  • google-drive@openai-curated
  • github@openai-curated
  • google-calendar@openai-curated
  • browser@openai-bundled
  • documents@openai-primary-runtime
  • spreadsheets@openai-primary-runtime
  • presentations@openai-primary-runtime

Affected connector calls tested:

  • Google Drive _get_profile
  • Google Drive _get_file_metadata
  • Gmail _get_profile
  • Google Calendar _get_profile
  • GitHub _get_profile

All tested codex_apps connector calls fail with:

tool call error: failed to get client

Caused by:
    MCP startup failed: timed out handshaking with MCP server after 30s
hongjieh · 2 months ago

Update: this reproduced again on 2026-06-08 with a newer Codex Desktop build, after my earlier reproduction above.

Environment:

  • Codex Desktop bundle version: 26.602.40724 / build 3593
  • Codex CLI/runtime from codex doctor --json: 0.137.0-alpha.4
  • OS: macOS 26.3 build 25D125, arm64
  • Auth mode: ChatGPT
  • Model in config: gpt-5.5
  • Affected codex_apps connectors tested: Gmail and Figma

Minimal repro during the broken state:

  1. Call Gmail read-only health check: gmail._get_profile
  2. Call Figma read-only health check: figma._whoami
  3. Retry both after a short pause

Both connectors failed at MCP client startup with the same error:

tool call error: failed to get client

Caused by:
    MCP startup failed: timed out handshaking with MCP server after 30s

This again looks like a shared codex_apps connector wrapper/session failure rather than a Gmail-specific authorization or query failure, because Gmail and Figma fail together before the actual connector API call can run.

Additional diagnostics from the same session:

codex doctor --json
overallStatus: fail
auth.credentials: ok, stored ChatGPT tokens: true, stored auth mode: chatgpt
mcp.config: ok, configured servers: 2
network.env: ok, proxy env vars: none
network.provider_reachability: fail, ChatGPT base URL request timed out
network.websocket_reachability: warning, Responses WebSocket handshake timed out

Expected behavior is still that Codex Desktop should recover/recreate the broken codex_apps MCP client/session after startup timeout, or surface a connector-runtime-specific recovery action, instead of leaving app connector tools visible but unusable.

egnaroog · 1 month ago

Adding another reproduction from Codex Desktop on Windows. The same MCP handshake timeout bug still reproduces in CLI 0.145.0 and Windows Store package 26.721.4979.0.

  • OS: Windows 11, x64
  • Auth mode: ChatGPT
  • Affected MCP server: figma (remote, OAuth)
  • Plugin: figma (curated, enabled)

Repro: run codex mcp login figma (completes successfully, fresh token is written); restart Codex Desktop; call any Figma tool. Tool router returns unsupported call because the tool is never registered.

Trace excerpt:

TRACE codex_mcp::connection_manager: MCP server tools unavailable while building tool list server_name=figma has_cached_tools=false startup_complete=false
WARN codex_mcp::rmcp_client: failed to initialize MCP client during shutdown: MCP startup failed: timed out handshaking with MCP server after 30s
ERROR codex_core::tools::router: error=unsupported call: mcp__figma__whoami

Observations:

  • Direct HTTP probe against the Figma MCP endpoint works (401 without auth, 200 with a valid token). The failure is in Codex's RMCP streamable HTTP handshake path.
  • A full Codex Desktop restart does not recover the connection.
  • Local stdio MCP server (node_repl) registers fine in the same session; only the streamable_http server is broken.
  • resources/list works for figma MCP in the same session; only tools/list and tools/call are blocked because the handshake never completes.
  • codex update reports success but installed version stays at 0.145.0 (npm latest is also 0.145.0). Desktop auto-updated from 26.715.x to 26.721.x, but the bug persists.

Hope this helps. This makes the Figma connector unusable from Codex on the affected versions, which is the published recommended integration path for Figma in Codex.