codex - 💡(How to fix) Fix Codex CLI does not interpolate ${CLAUDE_PLUGIN_ROOT} in plugin .mcp.json args, breaking imessage MCP [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19582Fetched 2026-04-26 05:14:28
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1unlabeled ×1

The imessage plugin from anthropics/claude-plugins-official ships a .mcp.json that references ${CLAUDE_PLUGIN_ROOT} — a placeholder Claude Code interpolates with the plugin install dir. Codex CLI passes the literal string through to the spawned process, so bun run --cwd ${CLAUDE_PLUGIN_ROOT} ... fails with ENOENT: Could not change directory to "${CLAUDE_PLUGIN_ROOT}".

Root Cause

The imessage plugin from anthropics/claude-plugins-official ships a .mcp.json that references ${CLAUDE_PLUGIN_ROOT} — a placeholder Claude Code interpolates with the plugin install dir. Codex CLI passes the literal string through to the spawned process, so bun run --cwd ${CLAUDE_PLUGIN_ROOT} ... fails with ENOENT: Could not change directory to "${CLAUDE_PLUGIN_ROOT}".

Fix Action

Workaround

Register a custom MCP via `codex mcp add` with the absolute install path; or edit cache `.mcp.json` (reverts on plugin re-extract).

RAW_BUFFERClick to expand / collapse

Summary

The imessage plugin from anthropics/claude-plugins-official ships a .mcp.json that references ${CLAUDE_PLUGIN_ROOT} — a placeholder Claude Code interpolates with the plugin install dir. Codex CLI passes the literal string through to the spawned process, so bun run --cwd ${CLAUDE_PLUGIN_ROOT} ... fails with ENOENT: Could not change directory to "${CLAUDE_PLUGIN_ROOT}".

Reproduction

  1. codex plugin marketplace add claude-plugins-official https://github.com/anthropics/claude-plugins-official.git
  2. Enable imessage@claude-plugins-official
  3. Launch Codex — startup log shows: MCP client for \imessage` failed to start: MCP startup failed: handshaking with MCP server failed: connection closed: initialize response`

`codex mcp list` confirms the literal placeholder:

``` imessage bun run --cwd ${CLAUDE_PLUGIN_ROOT} --shell=bun --silent start ```

Expected

Codex CLI should interpolate `${CLAUDE_PLUGIN_ROOT}` (and likely `${CLAUDE_PLUGIN_DATA}`, etc.) in `.mcp.json` `args[]` and `command` per the Claude Code plugin spec, since plugins shared between marketplaces rely on this idiom.

Workaround

Register a custom MCP via `codex mcp add` with the absolute install path; or edit cache `.mcp.json` (reverts on plugin re-extract).

Affected versions

Codex CLI (current GA as of 2026-04-25), claude-plugins-official imessage 0.1.0.

extent analysis

TL;DR

The issue can be fixed by interpolating the ${CLAUDE_PLUGIN_ROOT} placeholder in the .mcp.json file with the actual plugin install directory.

Guidance

  • Verify that the codex mcp list command shows the literal placeholder ${CLAUDE_PLUGIN_ROOT} in the imessage plugin configuration.
  • Check the Claude Code plugin spec to confirm the expected behavior for interpolating placeholders in .mcp.json files.
  • Consider registering a custom MCP via codex mcp add with the absolute install path as a temporary workaround.
  • Editing the cache .mcp.json file with the absolute path may also resolve the issue, but note that this change will be reverted on plugin re-extract.

Example

No code snippet is provided as it is not clearly supported by the issue.

Notes

The issue appears to be specific to the imessage plugin from claude-plugins-official and the current GA version of Codex CLI as of 2026-04-25.

Recommendation

Apply the workaround by registering a custom MCP via codex mcp add with the absolute install path, as this provides a temporary solution until the interpolation issue is resolved.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Codex CLI does not interpolate ${CLAUDE_PLUGIN_ROOT} in plugin .mcp.json args, breaking imessage MCP [1 comments, 2 participants]