codex_apps MCP startup fails on wham/apps even when proxied endpoint is reachable

Open 💬 3 comments Opened Apr 2, 2026 by iqdoctor
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Summary

codex_apps MCP startup fails on chatgpt.com/backend-api/wham/apps even when the endpoint is reachable through the configured proxy path and core Codex requests work.

This does not look like a simple HTTP_PROXY / HTTPS_PROXY / WS_PROXY / WSS_PROXY env omission. The proxied endpoint is reachable, but the RMCP streamable HTTP handshake fails during initialize / initialized notification exchange.

Environment

  • Codex CLI: v0.118.0
  • Auth: ChatGPT OAuth (~/.codex/auth.json)
  • Linux host
  • Proxy env set:
  • HTTP_PROXY=http://127.0.0.1:10809
  • HTTPS_PROXY=http://127.0.0.1:10809
  • WS_PROXY=http://127.0.0.1:10809
  • WSS_PROXY=http://127.0.0.1:10809
  • ALL_PROXY=socks5h://127.0.0.1:10808
  • NO_PROXY=127.0.0.1,localhost,...

Repro

  1. Use ChatGPT OAuth auth.
  2. Ensure apps = true (default behavior is enough; explicit config also reproduces):
[features]
apps = true
  1. Run:
codex e ping --skip-git-repo-check

Actual result

Startup shows:

⚠ MCP client for `codex_apps` failed to start: 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::rmcp_client::StreamableHttpResponseClient>>] error: Transport channel closed, when send initialized notification

And the runtime log contains:

failed to force-refresh tools for MCP server 'codex_apps' ... error sending request for url (https://chatgpt.com/backend-api/wham/apps), when send initialize request

Important observation

The same proxy path can reach the wham/apps endpoint successfully outside Codex.

Using the same auth token and the same HTTP proxy:

curl --proxy http://127.0.0.1:10809 \
  -H "Authorization: Bearer <access_token>" \
  -H "Accept: application/json" \
  -D - \
  https://chatgpt.com/backend-api/wham/apps

Response:

HTTP/2 405
allow: POST
content-type: application/json
{"detail":"Method Not Allowed"}

So the endpoint is reachable through the configured proxy path, and the failure appears to be in the RMCP / streamable HTTP handshake path rather than simple proxy env pickup.

Workaround

Disable apps/connectors:

[features]
apps = false

With that, the codex_apps startup warning disappears.

Relevant code paths

  • codex-rs/core/src/mcp/mod.rs
  • codex-rs/rmcp-client/src/rmcp_client.rs
  • build_http_client() currently builds a plain reqwest::Client::builder() path for this transport

Request

Please investigate the codex_apps streamable HTTP / RMCP handshake path for wham/apps under ChatGPT OAuth setups, especially when routed through configured proxy env. The endpoint itself is reachable, but the MCP initialize/initialized sequence fails.

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 4 months ago

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

  • #16360

Powered by Codex Action

matthewdm0816 · 3 months ago

This seemed to hang normal TUI chat even with apps = false in config.toml. Another workaround might be specifiying --disable apps option when starting codex TUI.

haoofun · 3 months ago

I am seeing what appears to be the same codex_apps MCP failure in Codex Desktop.

I filed a standalone issue with the full reproduction details here: #24785.

Environment:

  • macOS 26.5, build 25F71
  • Codex Desktop bundle version: 26.519.81530
  • Codex app version 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 and GitHub
  • Reinstalling the latest Codex Desktop did not fix it.
  • Recreating/rebuilding ~/.codex state did not fix it.

Codex Desktop connector calls fail with:

tool call error: failed to get client

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

Example 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

However, using the same local Codex ChatGPT auth token, direct JSON-RPC calls to the backend work:

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

Verified:

initialize: HTTP 200
serverInfo.name: codex-connectors-mcp
tools/list: HTTP 200
tool_count: 111
tools/call gmail_get_profile: HTTP 200, isError=false
tools/call github_list_user_orgs: HTTP 200, isError=false

So connector auth, connector scopes, and the remote backend appear to be working. The failure seems specific to Codex Desktop's built-in codex_apps MCP client/handshake path.