fix(codex): Codex turns fail when a plugin MCP server shares a configured server's name (#194831) Root cause: src/agents/codex-mcp-config.ts:293 (main 1fc5296cba84) `loadCodexBundleMcpThreadConfigCore` projected the bundled MCP servers into the Codex thread `configPatch` without dropping names that an enabled `mcp.servers` entry already owns. The configured server reaches Codex through the user-server projection (`src/agents/cli-runner/bundle-mcp-codex.ts:139`), and `buildCodexThreadRequestConfig` deep-merges both patches (`extensions/codex/src/app-server/thread-lifecycle-preflight.ts:412`, `plugin-thread-config.ts:388`). A bundled stdio `gbrain` plus a configured HTTP `gbrain` becomes one `mcp_servers.gbrain` table with both `command` and `url`, which Codex rejects at `thread/start` (codex-rs/config/src/mcp_types.rs:519-520 via app-server thread_processor.rs:1490-1493: `url is not supported for stdio`). Fixes #194825 Thanks @NicoBoom13 for the precise report and replay, and @lonexreb for the fix. ## What Problem This Solves When a plugin bundles an MCP server with the same name as a server in `mcp.servers`, every Codex-harness turn fails with `thread/start: failed to load configuration: url is not supported for stdio in mcp_servers.<name>`. A fallback chain that ends in a Codex model has no working last resort. ## User Impact A configured MCP server now wins a name collision with a plugin's bundled server on Codex turns, the same way it already wins everywhere else: the embedded runtime merge (`src/agents/bundle-mcp-config.ts:122`, configured entries spread over bundled ones and shadowed bundle servers dropped), the Codex static surface names, and the Codex approval config. Codex turns start again and the configured server keeps its own transport. Servers with distinct names are unchanged. ## Why This Change Was Made The bundle projection now leaves names owned by an enabled configured server to the user-server projection, so Codex gets one coherent entry per name. Because those names no longer pass through the bundle path, the durable-grant filtering that only applied to configured names there is dead and is removed (the user-server path still projects grants, covered in `bundle-mcp-codex.user-config.test.ts`), together with the now-unused `grants` parameter of `buildCodexMcpServersConfig`. No new config. ## Evidence Reproduced through the built Gateway (`node dist/entry.js`) with the real bundled Codex app-server (0.169.0) pointed at a local ChatGPT-backend fixture. Setup as an operator would do it: `openclaw plugins install` of a plugin bundle whose `.mcp.json` declares a stdio MCP server, plus a streamable-HTTP server in `mcp.servers`. One `chat.send` on a Codex model asks for the MCP tool. - main (d6e1699057e3), both named `gbrain`: `Codex agent harness failed ... thread/start: failed to load configuration: url is not supported for stdio in mcp_servers.gbrain`; the user sees "Your request couldn't be completed."; no model request is made. - This branch, both named `gbrain`: the turn completes. Codex calls `mcp__gbrain__http_probe` on the configured HTTP server (`initialize`, `tools/list`, `tools/call` logged there) and the bundled stdio copy is never started. - Control, distinct names (`plugin-mcp` stdio from the bundle, `gbrain` HTTP configured): same result on main and on this branch. Both servers connect and the HTTP tool call succeeds. - Regression test `leaves a same-named bundled server to the enabled configured server` fails on main (extra bundled `gbrain` stdio entry in `mcp_servers`) and passes here. `codex-mcp-config.test.ts` (7) and `bundle-mcp-codex.user-config.test.ts` (12) pass. Codex side: `codex-rs/config/src/mcp_types.rs:519-520` rejects `url` once `command` is set; `codex-rs/app-server/src/request_processors/thread_processor.rs:1490-1493` loads the thread config overrides at `thread/start` and returns it as `failed to load configuration`. Proof log: https://github.com/openclaw/openclaw/pull/194831#issuecomment-6975251916 Merge danger: two-way door. A revert restores the old projection; nothing is persisted or migrated. Blast radius: Codex-harness turns for setups where a plugin bundle and `mcp.servers` share a server name; those turns fail today. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Ayaan Zaidi <hi@obviy.us>
fix(codex): Codex turns fail when a plugin MCP server shares a config…
Find Your Interest
- How to Build an Accordion-Menu using CSS and a bit of jQuery
- wsf-xxxviii
- wsf-xxxvi
- What is the ID attribute in HTML really for?
- Github and Open-source Is a Boon for the Underprivileged
- Github and Open-source Is a Boon for the Underprivileged
- wsf-xxxi
- Pinned Apps – An App Model for the Web
- wsf-xxxiv
- Everyone Hates AI. Half of Them Use It.





