Codex App does not import plugin-bundled remote OAuth MCP server tools after codex mcp login until full app restart; new conversation insufficient; codex exec works
What version of the Codex App are you using (From “About Codex” dialog)?
0.142.4 (latest stable release at time of filing — Codex Desktop)
What subscription do you have?
API key login (Codex Desktop; usage-based OpenAI API billing — not a ChatGPT Plus/Pro/Team subscription)
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
A plugin-bundled remote OAuth MCP server is successfully authenticated, but its tools are never imported into the already-running interactive app, and opening a new conversation in the running app does not help — the tools only appear after a full app restart (quitting and relaunching the process).
What works:
- Plugin installs from a self-hosted marketplace; its
.mcp.jsondeclares a remote streamable-HTTP + OAuth server. codex mcp login <srv>→Successfully logged in to MCP server '<srv>'.codex mcp listshows the serverenabledwith auth typeOAuth(auth_status is notunsupported).- A fresh
codex execsubprocess (new OS process) imports the server's tools (mcp__<srv>.*) and successfully calls them, returning real data.
What fails:
- In the interactive app process that was already running when
codex mcp logincompleted, nomcp__<srv>.*tools are mounted into any thread. - Starting new conversations within the same running app does not surface the tools (tried many).
- Only fully quitting and relaunching the app makes the tools appear in interactive threads.
Because a fresh codex exec process imports and executes the tools end-to-end with the stored credentials, the server, OAuth, token attachment, tool list, and tool execution are all confirmed working. The gap is specifically that the interactive app does not (re)establish the MCP connection / hot-reload tools after a mid-session codex mcp login, and a new conversation within the same process is not enough to trigger a refresh.
What steps can reproduce the bug?
- Install a plugin that bundles a remote OAuth MCP server via a self-hosted marketplace (public, reproducible):
``bash`
codex plugin marketplace add geoly-ai/codex-plugins
codex plugin add geoly-mcp@geoly
.mcp.json
The plugin's is:`
json``
{
"mcpServers": {
"geoly": {
"type": "http",
"url": "https://app.geoly.ai/api/mcp",
"oauth_resource": "https://app.geoly.ai/api/mcp"
}
}
}
- With the app already running, authenticate the server:
``bash``
codex mcp login geoly # → "Successfully logged in to MCP server 'geoly'."
codex mcp list # → geoly https://app.geoly.ai/api/mcp enabled OAuth
- In a new conversation in the same running app, ask it to use the server's tools (e.g.
$geoly-mcp, ormcp__geoly.list_brands). → Nomcp__geoly.*tools are available; only previously-loaded MCP servers and built-ins (e.g.node_repl) are present. Opening more new conversations does not help. - Run a fresh subprocess instead:
``bash`
codex exec --dangerously-bypass-approvals-and-sandbox "Use the geoly MCP tools. Call list_organizations, then list_brands with org_id."
mcp__geoly.*` tools are enumerated and the calls succeed, returning real data.
→ The
- Fully quit and relaunch the app → the
mcp__geoly.*tools now appear in interactive threads.
What is the expected behavior?
After a successful codex mcp login <srv>, the running app should (re)connect to the server and import its tools — at minimum a newly opened conversation should pick them up without requiring a full process restart, matching the behavior of a fresh codex exec process (which already works).
Additional information
- Login: OpenAI API key on Codex Desktop (not ChatGPT auth). The related issues below were on ChatGPT-login; here a fresh
codex execon the same machine/login imports and calls the tools, so the gap is the interactive app process lifecycle, not the login type. - The MCP server is RFC 9728 / streamable-HTTP compliant and reachable: an unauthenticated
POST /api/mcpreturns401withWWW-Authenticate: Bearer resource_metadata="https://app.geoly.ai/.well-known/oauth-protected-resource"; the protected-resource metadata and authorization-server metadata are served and reachable;codex mcp logincompletes and stores the token. - The bundled MCP/OAuth client is
rmcp 1.8.0(percodex-rs/Cargo.lock). - Related issues (this one is distinct):
- #20009 — similar symptom, but there
auth_statusstays"unsupported"and restart does not help; hereauth_statusis fine and a full restart does surface the tools, andcodex execworks. - #18527 — remote OAuth server omitted from a thread with no auth prompt/error; there the server is not logged in, here it is successfully logged in.
- #15122 — MCP OAuth login persistence across restarts.
- Secondary observation: inside
codex exec, MCP tool calls were sometimes reported asuser cancelled MCP tool callunless--dangerously-bypass-approvals-and-sandboxwas passed — the non-interactive approval flow appears to auto-cancel MCP tool calls when no approval is provided.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗