Start with the MCP resources codex://status and codex://doctor. They do not
invoke a model and are safe to read during installation or debugging.
Run:
npm run build
claude --plugin-dir .Then ask Claude to read codex://status.
The resolver prefers:
- Per-call
codex_bin. CODEX_SUBAGENTS_CODEX_BIN./Applications/Codex.app/Contents/Resources/codex.CODEX_BIN.codexonPATH.
If needed, set:
export CODEX_SUBAGENTS_CODEX_BIN=/absolute/path/to/codexCheck that Claude was started with the plugin directory:
claude --plugin-dir .For installed-plugin development, run:
npm run install:local
npm run dev:watchThen ask Claude to use Codex naturally, for example:
Ask Codex to review this repository read-only.
The plugin includes a skill and front-door tools so Claude should not need to know the low-level tool names.
Prefer the native background/follow-up flow for long work:
codex_taskwithbackground: truecodex_followupwithmode: "wait"codex_followupwithmode: "steer"
Persistent sessions are the better choice when the work must survive an MCP restart. Async one-shot jobs are process-local and do not survive restarts.
Use codex_followup with mode: "wait" first. If the server restarted, start a
new codex_task unless you are deliberately using hidden debug session tools.
Check:
- whether the session has a
codexThreadId - whether it used
protocol: "app-server" - whether
supports.threadResumeis true - whether
thread/readis unavailable but recovery still succeeded
If app-server is unavailable, the plugin falls back to exec sessions unless
CODEX_SUBAGENTS_DISABLE_EXEC_FALLBACK=1 is set.
The plugin compacts large responses before returning them to Claude. If
mcpResponse.compacted is true, inspect the returned summary first. Full retained
stdout/stderr/final-message artifacts are written under the artifact directory
when output artifacts are enabled.
Useful settings:
export CODEX_SUBAGENTS_OUTPUT_ARTIFACTS=1
export CODEX_SUBAGENTS_ARTIFACT_DIR=/tmp/codex-subagents-artifactsVerbose JSONL logging is on by default and goes to stderr. To also write a file:
export CODEX_SUBAGENTS_LOG_FILE=/tmp/codex-subagents.log
export CODEX_SUBAGENTS_LOG_LEVEL=debugThe default debug profile intentionally logs raw MCP traffic. Treat logs as sensitive project data.
For quieter local usage:
export CODEX_SUBAGENTS_LOG_PROFILE=productionTo disable logging:
export CODEX_SUBAGENTS_LOG_LEVEL=silentSet CODEX_SUBAGENTS_ENABLE_DEBUG_TOOLS=1 and ask Claude to call
codex_export_debug_bundle, or run:
npm run diagnosticsBundles include status, selected session/job state, recent failures, queue/session limits, logging/artifact settings, lifecycle stats, and a bounded log tail when a log file is configured.
Use fake-Codex Claude tests first:
npm run test:claude-autodiscovery
npm run test:claude-orchestration
npm run test:claude-session-steeringThen use real Codex tests only when needed:
npm run test:real-app-server-steering
npm run test:claude-real-codex
npm run test:claude-real-sessionThese spend live Claude and/or Codex tokens.
Run the local update flow:
npm run update:localThen restart Claude Code. If Claude still loads an old version, run:
npm run dev:link
npm run validate:plugindev:link prints the marketplace and installed cache symlinks that Claude Code
and Claude Desktop share.