fix(session-relay): Codex MCP wiring — direct server map + sh cache-glob resolver#6
Merged
Merged
Conversation
…lob resolver (live-verified)
Two live-verified root causes on codex 0.142.5 (latest):
(1) Codex parses only a DIRECT server map or snake_case mcp_servers —
our camelCase mcpServers wrapper was silently ignored, so the bus
never loaded on Codex (latent since 0.1.0).
(2) Codex substitutes ${PLUGIN_ROOT} nowhere in MCP config (command
OR args) and exports no PLUGIN_ROOT env to MCP children (only hooks
get it) — openai/codex#19372, still open. The plan's STOP condition
fired; shipped its prescribed fallback: sh -c tries $PLUGIN_ROOT
first (future-proof), else execs the newest
~/.codex/plugins/cache/*/session-relay/*/bin/relay.
Verified live: whoami + roster answer over the plugin MCP handshake
in a real codex exec session. Plan Interfaces/acceptance/STOP/M&DE
updated to the verified forms.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UyDDEDsq6yGeJKzNAwW3ZQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Live verification of the rust-port plan's Codex leg found the bus never loaded on Codex — two root causes, both empirically confirmed on codex 0.142.5 (latest):
mcp_servers; our camelCasemcpServerswas silently ignored (latent since 0.1.0 — the Node form never loaded either).RUST_LOGtrace shows${PLUGIN_ROOT}reaching spawn unsubstituted, and an env-dump probe shows MCP children get noPLUGIN_ROOT/CLAUDE_PLUGIN_ROOTenv (hooks do get them) — openai/codex#19372, still open.The plan's STOP condition fired and its prescribed fallback ships here:
sh -ctries$PLUGIN_ROOTfirst (future-proof for the upstream fix), else execs the newest~/.codex/plugins/cache/*/session-relay/*/bin/relay.Live-verified:
whoamiandrosteranswer with real JSON over the plugin MCP handshake in realcodex execsessions. Plan Interfaces table, acceptance criterion, STOP condition, and Mistakes & Dead Ends updated to the verified forms.node scripts/ci.mjsgreen.Remaining live legs (interactive-only): Codex hook trust approval (one-time prompt) + the full Claude⇄Codex round-trip.
🤖 Generated with Claude Code
https://claude.ai/code/session_01UyDDEDsq6yGeJKzNAwW3ZQ