codex-in-claude
codex-in-claude is a deprecated FastMCP plugin that lets Claude Code call OpenAI Codex for second opinions, git-diff reviews, and delegated coding tasks — read-only by default, with worktree-isolated edits returned as unapplied diffs.
Consult (paid, read-only):
codex_consult/codex_consult_asyncask Codex a question or repo-grounded query; returns summary, findings, next steps, assumptions.Review (paid, read-only):
codex_review_changes/codex_review_changes_asyncreviewworking_tree,branch, orcommitchanges and return structured findings withverdict,confidence, andcoverage(disclosing omitted/truncated/redacted files).Delegate (paid, propose tier):
codex_delegate/codex_delegate_asyncimplement a task in a throwawayworkspace-writegit worktree and return a reviewablediffthat is never auto-applied.Free previews:
codex_dry_runandcodex_delegate_dry_runshow scope, diff size, redactions, prompt bytes, and worktree baseline before spending.Free readiness/discovery:
codex_status(CLI found, version, auth, rate-limit windows),codex_capabilities(tool inventory + fingerprint),codex_models(advisory model slugs and reasoning efforts).Session transfer (free):
codex_transferconverts a Claude Code transcript into a resumable Codex thread and returns acodex resume <thread_id>command.Background-job lifecycle (free):
codex_job_status,codex_job_result,codex_job_consume_result,codex_job_cancel,codex_job_list— disk-backed, survive restarts, poll withpoll_after_ms.Safety posture: consult/review are strictly read-only; delegate's writes are confined to a temp worktree (plus OS temp roots); secret redaction is best-effort on gathered diffs and returned text; no
--dangerously-bypass-*flags are ever passed.Slash-command wrappers:
/codex:status,/codex:consult,/codex:review,/codex:delegate,/codex:delegate-async,/codex:dry-run,/codex:transfer.
Enables Claude Code to call OpenAI Codex for independent second opinions, structured code review, and delegated coding tasks in a safe, isolated environment.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@codex-in-claude review my git changes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
codex-in-claude
Call OpenAI Codex from Claude Code — an independent second opinion, structured code
review, and delegated coding tasks (cross-model review) — through a FastMCP plugin that drives
the codex CLI safely.
Deprecated. codex-in-claude is superseded by amicus,
which calls Codex and other backends (Kimi, Claude Code) through one MCP server.
0.24.0 is the final release. The repository is archived after it ships: installed versions
keep running, but get no fixes or releases. New users should install amicus. Each tool's
deprecation marker (in its _meta and its codex_capabilities entry) names its amicus successor,
except codex_transfer, which has none.
Contents: Why · Quick start · Example · Requirements · Tools · Skills · Result envelopes · Safety · Configuration · Troubleshooting · Local development
Why
A second model is a cheap, high-value check. codex-in-claude lets a Claude Code session hand
Codex a question, a diff to review, or a task to implement — and get back a structured,
safe-by-default result you stay in control of.
Tier | Codex sandbox | Where edits go | Use for |
|
| nothing — text/findings only | questions, second opinions |
|
| nothing — structured findings | reviewing your git changes |
|
| worktree diff → returns a reviewable diff, never auto-applied | delegating a coding task |
An opt-in apply tier for live-tree edits was planned but never shipped, and no tool exposes it.
Related MCP server: claude-code-codex-agents
Quick start
First, in a terminal, make sure the codex CLI is installed and log in (a no-op if you already are):
codex loginThen, inside a Claude Code session, add the marketplace and install the plugin:
/plugin marketplace add briandconnelly/codex-in-claude
/plugin install codex-in-claudeThen run /codex:status in Claude Code. It is free (no model call) and checks that the codex
CLI is found, authenticated, and within the tested compatibility range.
For a first useful run:
/codex:consult is this approach sound?for a read-only second opinion./codex:reviewto review your current git changes./codex:delegate add focused tests for this behaviorto get a proposed diff in an isolated worktree.
The MCP server is launched on demand via uvx from a pinned PyPI release, so updates are deliberate.
Example
Review your uncommitted changes from a Claude Code session:
/codex:review
Codex inspects the diff read-only and returns a structured result envelope (abridged):
{
"ok": true,
"tool": "codex_review_changes",
"verdict": "concerns",
"confidence": "high",
"review_status": "completed",
"coverage": { "status": "complete", "untracked_files_detected": 0, "untracked_files_omitted": 0, "omission_reasons": [], "redaction": null },
"summary": "The retry path is correct, but the backoff delay leaks between calls and the new branch has no test coverage.",
"findings": [
{
"severity": "high",
"title": "Backoff delay is never reset after a success",
"file": "src/app/retry.py",
"line": 42,
"evidence": "self._delay keeps its last value once a call succeeds",
"risk": "A later transient failure starts from an inflated delay, adding latency.",
"recommendation": "Reset self._delay to the base delay in the success branch."
}
],
"next_steps": ["Add a regression test asserting the delay resets after a success"],
"meta": { "scope": "working_tree", "sandbox": "read-only", "elapsed_ms": 8137 }
}verdict is one of pass / concerns / fail / unknown; confidence is low / medium /
high; every finding carries a severity (critical … nit) plus evidence, risk, and
recommendation. verdict is the safe overall conclusion: review_status tells you whether the
model actually ran (a tree with nothing reviewable returns not_run/unknown, never a false
pass), and coverage discloses anything the model was not shown — omitted untracked files
(governed by the untracked policy), a truncated diff, or a redacted file — downgrading a pass
over partial coverage to unknown. The envelope above is abridged — meta (always present, with cwd, tier,
sandbox, isolation, and timing), request_id, raw_response, and other fields are trimmed for
brevity; see docs/REFERENCE.md for the complete shape.
Requirements
macOS or Linux (POSIX). Windows is not supported natively — the async-job safety layer (file locks, process groups, signal-driven cancellation) is POSIX-only. Run it under WSL2 on Windows. See
COMPATIBILITY.mdfor the platform contract.The
codexCLI onPATH, authenticated (codex login— ChatGPT or API key). Tested againstcodex-cli 0.152; the supported range lives incli_contract.py,/codex:statusreports whether your version is in range, andCOMPATIBILITY.mdexplains the policy.uvonPATH(Claude Code launches the MCP server withuvx).Python 3.11+ available to
uvx.git(for review and delegate).
Tools
Active (call the model and may spend tokens):
codex_consult(question, …)— read-only second opinion / answer.codex_review_changes(scope, base, commit, paths, …)— reviewworking_tree/branch/commit; returns structured findings.Both consult and review (sync and
_async) also takedeveloper_instructions— optional caller stance/focus text placed in Codex's developer turn behind this server's always-leading framing (max 4096 bytes; stripped, blank = omitted; refused pre-spend if it carries the server's framing markers). It grants no tools and Codex is instructed — not compelled — to keep verdicts its own; compliance with the rest of the text is best-effort for the same reason, and may be silent, someta's fingerprint attests the request the server accepted and staged, not what the model did with it. The text rides the codex command line and the background-job record on disk, so never put secrets in it, and resultmetareports only its{sha256, bytes}. Deliberately not oncodex_delegate: delegate edits files, so a caller stance there would widen what an untrusted workspace can steer. Full contract: thecodex://paramsresource.codex_delegate(task, …)— implement a task in an isolated worktree; returns a reviewablediffthat is not applied.codex_consult_async(question, …),codex_review_changes_async(scope, base, commit, paths, …),codex_delegate_async(task, …)— detached variants of the three active tools, taking the same arguments as their synchronous forms: each returns ajob_idimmediately. Starting a job commits to spend (it runs to completion or its deadline); poll withcodex_job_status/codex_job_result.
Free (local only):
codex_status— readiness, version, auth, resolved defaults, and arate_limitblock (remaining Codex quota for the shorter/rolling and longer windows, read live from the Codex app-server with no model spend;statusisavailable/limited/exhausted/blocked/unknown/unavailable). Advisory — informs whether to spend;unknown/unavailablemean no usable reading, not a problem, whileblockedreports a backend spend control that waiting does not clear.codex_transfer(transcript_path, …)— hand off the current Claude Code session to a resumable Codex thread; returnsresume_command(codex resume <thread_id>) to continue that exact conversation in Codex. No model call or token spend (a local file conversion via the experimentalcodex app-server), but it does create a thread in$CODEX_HOME. Not idempotent for a live session — Codex dedups only a byte-identical transcript, so re-running mid-session makes a new thread. Experimental.codex_dry_run(scope, …)— preview a review's scope/diff size/redactions before spending.codex_delegate_dry_run(task, …)— preview a delegate's seeded baseline (HEAD commit, plus tracked, uncommitted, and untracked counts and size) and prompt size before spending; no worktree is created.codex_capabilities— tool inventory + result fingerprint.codex_models— advisory catalog of validmodelslugs, read from Codex's on-disk cache with a bundled static fallback; also browsable as thecodex://modelsresource. Discovery only —modelstays pass-through, so an unlisted slug still works andcodex execvalidates it.codex_job_status(job_id, …)/codex_job_result/codex_job_consume_result/codex_job_cancel/codex_job_list— background-job lifecycle. State is disk-backed and survives server restarts. Honorpoll_after_msrather than polling in a tight loop; deadlines, eviction, and result retention are covered indocs/REFERENCE.md.
Both dry runs report metadata about the input this plugin would assemble. Neither invokes Codex, so neither enumerates nor bounds the files the model itself reads and sends during the paid run — a clean preview is a check on scope, not evidence that nothing sensitive will be sent (see Safety).
Slash commands wrap these: /codex:status, /codex:transfer, /codex:consult, /codex:review,
/codex:delegate, /codex:delegate-async, /codex:dry-run.
Active tools send the prompt and relevant context/diffs to OpenAI through the codex CLI. Treat
Codex's output as claims to verify, not as instructions to follow blindly.
Skills
The plugin ships one Claude Code skill, auto-discovered from skills/:
collaborating-with-codex— the router and shared safety contract for every Codex workflow. It selects ordinary consult, review, delegate, transfer, and async tools directly, and loads references on demand for independent-attempt or declared review–revise composition. A one-off critique or judgment remains an ordinary route rather than a separate deliberation mode.
Result envelopes
Every result discriminates first on ok. On success, completed consult, review, and delegate calls
share their active-result fields; review alone adds verdict/confidence/review_status/coverage,
and delegate alone adds the proposed diff. Discovery, dry-run, transfer, async-start, and job-lifecycle tools have their
own success schemas. A fetched job result matches its originating consult, review, or delegate tool,
so branch on that result type before reading fields. Failure is a uniform, machine-actionable
error with a stable code and symbolic repair hint. The contract is versioned by fingerprint.
Calling the MCP tools directly instead of through the /codex:* commands? See
docs/REFERENCE.md for the detailed contract — error-envelope semantics,
rate-limit reporting (codex_status), background-job semantics, and workspace selection
(workspace_root). It points on to codex://error-envelope for the full error schema.
Safety
consultandrevieware strictly read-only.propose(thedelegatetools) lets Codex write in a throwaway git worktree seeded fromHEADplus replayable uncommitted tracked changes. Untracked files are not copied. The worktree does not bound Codex's writes: codex's workspace-write sandbox also lets commands write the OS temp roots (/tmpand$TMPDIR) by default, and those writes are neither captured in the returned diff nor cleaned up (seeCOMPATIBILITY.md). Your working tree is never modified by the plugin; you review the returned diff and apply it yourself. Delegate's no-network sandbox (workspace-write) blocks egress only for commands Codex runs in the sandbox — it does not mean nothing leaves the machine: the model call still sends your task and repo context to OpenAI.Do not target a workspace containing secrets you cannot disclose. Supplied prompts and context (
question,task,extra_context, and similar author input) are sent raw. During every active call — including consult — Codex may read files outside the resolved workspace, up to everything the OS user running codex can read, and send them to OpenAI: the sandbox bounds writes, not reads, so no choice of workspace is a read boundary, and a prompt-injected repository can direct those reads anywhere that user can reach. Codex also pulls in context implicitly:AGENTS.mdis auto-loaded from the resolved workspace and — inside a repository — from every ancestor directory up to the repository root, so narrowing the workspace to a subdirectory does not exclude the repo-root file; plus a user-global$CODEX_HOME/AGENTS.override.md, else$CODEX_HOME/AGENTS.md, which loads on every call from any workspace. Skills under.agents/skills/— plus your user-global Codex skills under$CODEX_HOME/skills/(default~/.codex/skills/) — are auto-discovered by name and description, and a skill the model then selects has its body read in as well. Either way the content can be sent to OpenAI even if your prompt never mentions it (for delegate, the versions seeded into the throwaway worktree apply there; the user-global skills are reachable regardless of workspace, since they are discovered from outside it). The plugin's isolation flags do not suppress any of this — including--ignore-user-config, which drops$CODEX_HOME/config.tomlbut not$CODEX_HOME/skills/. Details, the verifying probe, and the remaining unverified edge cases are inCOMPATIBILITY.md.Redaction is output/diff defense-in-depth, not input protection and not a guarantee. It protects gathered diffs and returned free text (
summary,findings,raw_response.text): secret-looking file hunks are dropped, and inline matches are replaced with[redacted: secret value]— no affirmative sign the match stopped short, which is not the same as proof it's complete — or[redacted: possibly partial secret value]when it finds one: a trailing character the matched text's own alphabet could not have produced (the value may continue past the marker), or a leading character that could continue the same token (the match may have started mid-token). Neither marker is a guarantee either way: a free-form secret can contain almost any character, and flagging every unusual neighbor as suspect would fire on nearly every redaction and stop meaning anything.Control characters are deleted from the same returned free text, before redaction runs — an escape sequence in an envelope can corrupt or spoof how it renders, and one wedged into a secret would defeat the redactor.
raw_response.textand machine fields (a reviewverdict, a finding'sfile, an argument name) are deliberately left alone; seedocs/REFERENCE.md.The plugin never passes Codex's
--dangerously-bypass-*flags.Found a vulnerability? Report it privately — see
SECURITY.md.
Configuration (env, CODEX_IN_CLAUDE_*)
Var | Default | Meaning |
| unset | Codex model override |
| unset | Codex reasoning-effort override, sent as a |
| 300 | per-call timeout (clamped 10–600) |
|
|
|
| unset | extra global |
| 200000 | byte cap on author input: gathered diffs are truncated to it, author text above it is rejected with |
| 200000 | cap on the inline diff a delegate run returns; larger diffs are truncated with |
| 10485760 | byte cap for captured stdout (head+tail window; run not killed); stderr is bounded to a separate ~1 MiB reserve |
| 60 | git command timeout |
|
| disk-backed background-job records |
| 86400 | seconds a finished job record is kept (min 60) |
| 1800 | background-job wall-clock cap (clamped 60–7200) |
| 50 | retained jobs per workspace (clamped 1–1000); a soft cap — only terminal records are evicted, so a busy workspace can hold more |
| built-in tested set | comma-separated |
|
| server diagnostic log level ( |
| unset | also mirror diagnostic logs to this file path |
| unset | set to |
| unset | explicit override for which |
Two further variables, CODEX_IN_CLAUDE_TIER_DEFAULT and CODEX_IN_CLAUDE_SANDBOX_DEFAULT, were
added for that unshipped apply tier. They only change the defaults codex_status reports — every
shipped tool pins its own tier and sandbox and ignores them.
Troubleshooting
Run /codex:status first — it's free (no model call) and diagnoses most setup problems.
Symptom | Cause | Fix |
| CLI not installed or not on | |
Not authenticated | No Codex login |
|
Unsupported-version warning | Your | Update |
| Server fell back to its own launch directory | Run from the target repo, or pass |
| The temp worktree is seeded from | Make at least one commit first |
| Account hit a usage/rate limit | Back off for |
| The stdio MCP server is down | Reconnect with the |
A stdio MCP server can't be transparently auto-restarted (the client owns the pipe and the
initialize handshake), so recovery is a manual reconnect. On a fatal crash the server writes a
breadcrumb to stderr (server name, version, reason, and a /mcp reconnect hint) before exiting,
and logs clean disconnects (EOF / broken pipe / SIGINT / SIGTERM) as shutdown rather than crashes
— so the server logs tell you whether it died or was stopped.
If the MCP server is down, you can fall back to the codex CLI directly for a read-only consult or
review (prompt on stdin; set WORKSPACE to the directory Codex should work in — note it
selects where Codex works, not what it can read, so approve the exposure of anything the OS
user can reach, not just that tree):
WORKSPACE=/absolute/approved/path codex exec --sandbox read-only --ephemeral \
--ignore-user-config --ignore-rules --disable remote_plugin --disable sleep_tool \
--cd "$WORKSPACE" --skip-git-repo-check -Keep every flag — together they apply the plugin's guarantee-bearing flags at its strictest config
isolation, plus --disable sleep_tool, which is spend hygiene rather than a guarantee (it removes
Codex's native sleep tool — see COMPATIBILITY.md → "Sleep tool" — and here no server deadline
would cut a sleep short) — but this still bypasses the plugin's diff gathering, secret redaction, input-byte
bounding, and structured envelope, so sanitize input yourself and prefer restoring the server. See
the collaborating-with-codex skill for the full fallback guidance.
Local development
uv sync
uv run pytest # unit tests (95% coverage floor)
uv run pytest -m integration --no-cov # live tests; needs codex installed + logged in
uv run codex-in-claude-mcp # run the MCP server over stdioThe full pre-PR gate — lint, format, types, tests — is defined once in
AGENTS.md → Tooling.
To test the plugin from a local checkout, point .mcp.json at
uv run --project /path/to/codex-in-claude codex-in-claude-mcp instead of the version-pinned
uvx --from codex-in-claude==<version> invocation it ships with.
See CONTRIBUTING.md for branch, commit, and PR conventions.
Related projects
claude-in-codex— the mirror image: lets Codex call Claude Code.Inspired by
openai/codex-plugin-cc, rebuilt aroundcodex execfor robustness: every paid call goes through it, and onlycodex_transfertouches the experimental app-server protocol.
License
MIT
Available Tools
17 toolscodex_capabilitiesList server capabilities (free)ARead-only
Deprecated: use amicus_capabilities. List this server's tools, tiers, and the result fingerprint. Free — no model call. Clients can cache by the fingerprint.
detail="summary" (default) returns each tool's name, cost, stability, error_codes,
and deprecation marker — the facts tools/list does not already carry — plus
async_lifecycle, but only for the *_async tools. detail="full" adds
use_when/returns/required_params/key_optional_params, restating what you already hold.
detail="contracts" omits tool_details.
Pass include_schemas to also embed the full 'error-envelope', 'result-meta', 'capabilities-result', and/or 'status-result' schema, and/or the 'parameter-contracts' document (a contract doc, not a JSON Schema) — a tool-reachable fallback to the codex:// resources for resource-blind clients. It works in any detail mode.
Inputs: detail, include_schemas. Returns: ok
codex_consultConsult Codex (paid)A
Deprecated: use amicus_consult. Ask Codex (a different model) for a read-only second opinion or answer.
PAID — this spends Codex quota on every new call; there is no dry-run preview for a consult, so run codex_status (free) first to confirm the CLI is installed and authenticated.
Runs codex exec in a read-only sandbox — Codex never edits files. A STATIC
review, not a verify mode: the read-only sandbox blocks the writes a
test/build/lint run needs, so Codex can't run your checks to confirm its claims —
treat findings as unvalidated claims you verify yourself. Pass workspace_root
(absolute) for a repo-grounded question; omit it for pure Q&A. Returns a result
envelope.
Data egress: this sends your question, extra_context, and
developer_instructions to OpenAI via the
codex CLI. Codex always runs with a resolved working directory (workspace_root,
your MCP roots, or the server's cwd as a fallback) — that selects where it works,
not what it can read.
Codex can read files outside the workspace — up to everything the OS user running it can
read — and send them to OpenAI. The sandbox bounds writes, not reads, so no choice of
workspace is a read boundary. Codex auto-loads the resolved workspace's AGENTS.md and, in a
repository, ancestor AGENTS.md files through its root, plus a user-global
$CODEX_HOME/AGENTS.override.md, else $CODEX_HOME/AGENTS.md; it discovers skills in the
workspace's
.agents/skills/ and user-global $CODEX_HOME/skills/ (default ~/.codex/skills/),
reachable from outside the workspace. The plugin's
isolation flags don't suppress any of it. A skill's name and description arrive up
front; selecting one makes the model read its body, which can reach OpenAI even if
your inputs never mention it. Your inputs are sent raw — secret
redaction is best-effort and does not cover them (it covers gathered diffs and
Codex's returned output, not what you type or what Codex reads from files).
Progress & recovery: blocks up to the resolved deadline (timeout_seconds, clamped
10-600s; when omitted, the server-configured value, built-in default 300s). If that deadline
expires the run is terminated and its partial output is not recoverable or resumable, so for a
high-reasoning_effort or broad repo-grounded consult that may exceed it, prefer
codex_consult_async (a background job, built-in default 1800s deadline; poll
codex_job_status). Coarse notifications/progress streams while it blocks when your client
requests it; some MCP clients background a long call before the deadline, so
timeout_seconds bounds the run, not necessarily the inline wait — either way the detached run
(meta.job_id) is recoverable via codex_job_list→codex_job_status→codex_job_result.
Inputs: question (required), model, detail, isolation, +6 more. Returns: ok
codex_consult_asyncConsult Codex in background (paid)A
Deprecated: use amicus_consult_async. Ask Codex for a read-only second opinion in the background; get a job_id
back immediately instead of blocking.
PAID — this spends Codex quota on every new call; there is no dry-run preview for a consult, so run codex_status (free) first to confirm the CLI is installed and authenticated.
Same read-only behavior as codex_consult (Codex never edits files), but detached —
prefer it for a high-reasoning_effort or broad repo-grounded consult that can exceed the
synchronous deadline (built-in default 300s), since a sync run whose deadline expires loses
its partial work; this job's own deadline is separately configured (built-in default 1800s).
Starting a job commits to spend (it runs to completion or its wall-clock deadline even if
you never poll). Poll codex_job_status; read/consume the consult envelope with
codex_job_result/codex_job_consume_result; stop with codex_job_cancel.
Data egress: same as codex_consult — sends your question, extra_context, and
developer_instructions
(raw, unredacted) to OpenAI via the codex CLI. Its resolved working directory
(workspace_root, your MCP roots, or the server cwd) selects where Codex works, not
what it can read.
Codex can read files outside the workspace — up to everything the OS user running it can
read — and send them to OpenAI. The sandbox bounds writes, not reads, so no choice of
workspace is a read boundary.
Codex auto-loads the resolved workspace's AGENTS.md and, in a repository, ancestor
AGENTS.md files through its root, plus a user-global $CODEX_HOME/AGENTS.override.md,
else $CODEX_HOME/AGENTS.md; it discovers skills in the workspace's .agents/skills/ and
user-global
$CODEX_HOME/skills/ (default ~/.codex/skills/), reachable from outside the workspace. A
skill's name and
description arrive up front; selecting one makes the model read its body, which can
reach OpenAI even if your inputs never mention it.
Inputs: question (required), model, isolation, extra_context, +4 more. Returns: ok
codex_delegateDelegate a coding task (paid)ADestructive
Deprecated: use amicus_delegate. Delegate a coding task to Codex (a different model) in an isolated git worktree, and get back a reviewable diff that is NOT applied to your tree.
PAID — this spends Codex quota on every new call; use codex_delegate_dry_run or codex_status (both free) first if you only need to check scope or readiness.
Codex edits files with workspace-write in a throwaway worktree seeded from
your current tracked state. The returned diff is Codex's changes;
review it, then apply it yourself if you want it. Requires a git repo with at
least one commit. Pass workspace_root (absolute).
NO NETWORK: workspace-write blocks network egress for commands Codex RUNS in the
sandbox, so the task must be self-contained — it cannot git push/fetch, gh
anything, curl, publish, or install dependencies (those fail inside the sandbox
with a DNS/host-resolution error). Ask only for local code changes; do any network
step yourself afterward. This does NOT mean nothing leaves the machine: the Codex
model call still sends your task to OpenAI. The worktree does not bound Codex's
writes: codex's workspace-write sandbox also lets commands write the OS temp roots
(/tmp and $TMPDIR) by default. Temp-root writes are neither captured in the
returned diff nor cleaned up.
Codex can read files outside the workspace — up to everything the OS user running it can
read — and send them to OpenAI. The sandbox bounds writes, not reads, so no choice of
workspace is a read boundary. Codex auto-loads the resolved workspace's AGENTS.md
and, in a repository, ancestor AGENTS.md files through its root, plus a user-global
$CODEX_HOME/AGENTS.override.md, else $CODEX_HOME/AGENTS.md; it discovers skills in the
workspace's
.agents/skills/ and user-global $CODEX_HOME/skills/ (default ~/.codex/skills/),
reachable from outside the workspace. The plugin's isolation flags don't suppress any of it.
For delegate,
that workspace is the worktree; scrubbing it doesn't exclude $CODEX_HOME/skills/.
A skill's name and description arrive up front; selecting one makes the model read
its body, which can reach OpenAI even if your inputs never mention it.
Your task is sent raw — secret redaction is best-effort and does not cover it or
files Codex reads itself.
Progress & recovery: blocks up to the resolved deadline (timeout_seconds, clamped
10-600s; when omitted, the server-configured value, built-in default 300s). If that deadline
expires the run is terminated and its partial output is not recoverable or resumable, so for a
substantial or multi-file task that may exceed it, prefer codex_delegate_async (a background
job, built-in default 1800s deadline; poll codex_job_status). Coarse notifications/progress
streams while it blocks when your client requests it; some MCP clients background a long call
before the deadline, so timeout_seconds bounds the run, not necessarily the inline wait —
either way the detached run (meta.job_id) is recoverable via
codex_job_list→codex_job_status→codex_job_result.
Inputs: task (required), model, detail, isolation, +4 more. Returns: ok
codex_delegate_asyncDelegate in background (paid)ADestructive
Deprecated: use amicus_delegate_async. Delegate a coding task to Codex in the background and get a job_id back
immediately (does not block on the run).
PAID — this spends Codex quota on every new call; use codex_delegate_dry_run or codex_status (both free) first if you only need to check scope or readiness.
Same propose-tier behavior as codex_delegate — Codex works in a throwaway git
worktree and the result carries a reviewable diff that is NOT applied — but
detached; prefer it for a substantial or multi-file implementation task that can exceed the
synchronous deadline (built-in default 300s), since a sync run whose deadline expires loses
its partial work (this job's own deadline is separately configured, built-in default 1800s).
Starting a job commits to spend (it runs to completion or its wall-clock deadline even if
you never poll). Poll codex_job_status; read/consume with
codex_job_result/codex_job_consume_result; stop with codex_job_cancel. Requires a git
repo with at least one commit; pass workspace_root (absolute).
NO NETWORK: like codex_delegate, this runs under workspace-write, which blocks
network egress for commands Codex RUNS in the sandbox — the task must be
self-contained (no push/fetch/gh/curl/publish/dependency install; those fail with
a DNS/host-resolution error in the sandbox). This does NOT mean nothing leaves the
machine: the Codex model call still sends your task (raw) to OpenAI. The worktree
does not bound Codex's writes: codex's workspace-write sandbox also lets commands
write the OS temp roots (/tmp and $TMPDIR) by default. Temp-root writes are neither
captured in the returned diff nor cleaned up.
Codex can read files outside the workspace — up to everything the OS user running it can
read — and send them to OpenAI. The sandbox bounds writes, not reads, so no choice of
workspace is a read boundary. Codex auto-loads the resolved
workspace's AGENTS.md and, in a repository, ancestor AGENTS.md files through its root,
plus a user-global $CODEX_HOME/AGENTS.override.md, else $CODEX_HOME/AGENTS.md; it
discovers skills in
the workspace's .agents/skills/ and user-global $CODEX_HOME/skills/ (default
~/.codex/skills/), reachable from outside the workspace. For delegate, that workspace is
the worktree; scrubbing it
doesn't exclude $CODEX_HOME/skills/. A skill's name and description arrive up
front; selecting one makes the model read its body, which can reach OpenAI even if
your inputs never mention it. Secret redaction is best-effort and
does not cover your task or files Codex reads itself.
Inputs: task (required), model, isolation, workspace_root, +2 more. Returns: ok
codex_delegate_dry_runPreview a delegate (free)ARead-only
Deprecated: use amicus_delegate_dry_run. Preview what a codex_delegate/codex_delegate_async call would do — the
baseline it seeds from (HEAD commit, tracked file count/size, uncommitted and
untracked counts), the prompt size that would be sent, and the resolved
workspace/isolation. Free — no model call, no spend, no worktree created.
Use it before delegating to confirm scope and repo before committing to cost,
exactly as codex_dry_run previews codex_review_changes. Mirrors the real
delegate's zero-spend validation (workspace, isolation, task size, git repo), so
a failure here is a failure the paid call would also hit. The returned
tier/sandbox describe the previewed propose run, not this read-only preview;
the result echoes the effective model/reasoning_effort overrides the paid
call would send (unvalidated). deadline_advisory is non-null when size or
reasoning effort risks the synchronous deadline and names codex_delegate_async
verbatim — the async counterpart of the previewed call, not of this dry-run tool.
A hint, not a refusal.
A dry run reports metadata about the input this plugin would assemble; it does not invoke Codex, and it neither enumerates nor bounds the files the model itself reads and sends during the paid call. Codex can read files outside the workspace — up to everything the OS user running it can read — and send them to OpenAI. The sandbox bounds writes, not reads, so no choice of workspace is a read boundary.
Inputs: task (required), model, isolation, workspace_root, +1 more. Returns: ok
codex_dry_runPreview a review (free)ARead-only
Deprecated: use amicus_review_changes_dry_run. Preview what a codex_review_changes call would send — scope, diff size,
redactions, truncation. Free — no model call, no spend. Use it before a
review to inspect the scope and the reported redactions; redaction is
best-effort, so treat the preview as a check on scope, not as confirmation
that no secret remains. Pass the same extra_context and untracked policy
you would give the review so the preview matches it. would_call_model reports
whether the paid call would actually run the model (False on an empty diff, where
prompt_bytes is 0), and coverage discloses omitted untracked files just as the
review would. The result echoes the effective model/reasoning_effort overrides
the paid call would send (unvalidated). deadline_advisory is non-null when size
or effort risks the synchronous deadline (null whenever would_call_model is
False) and names codex_review_changes_async verbatim — the async counterpart of
the previewed call, not of this dry-run tool. A hint, not a refusal.
A dry run reports metadata about the input this plugin would assemble; it does not invoke Codex, and it neither enumerates nor bounds the files the model itself reads and sends during the paid call. Codex can read files outside the workspace — up to everything the OS user running it can read — and send them to OpenAI. The sandbox bounds writes, not reads, so no choice of workspace is a read boundary.
Inputs: base, model, paths, scope, +6 more. Returns: ok
codex_job_cancelCancel a job (free)AIdempotent
Deprecated: use amicus_job_cancel. Cancel a running background Codex job.
Asks the worker to shut down gracefully so it tears down its throwaway worktree,
then force-kills it if it overstays, and marks the job cancelled (cancelled jobs
cannot be resumed). If the worktree could not be removed, cleanup_warnings
names the leftover path. Already-terminal jobs are returned unchanged, so cancel
is idempotent — a retry after a lost response is safe. Free — no model call.
Inputs: job_id (required), workspace_root. Returns: ok
codex_job_consume_resultFetch and delete job result (free)A
Deprecated: use amicus_job_consume_result. Fetch a finished background Codex job's result and delete the stored record.
Same envelope as codex_job_result (matching the job's kind — branch on tool),
then removes completed job state — but only once the stored result has been read
intact and validated (a success or the job's own error envelope): a stored result
this release cannot read (job_result_incompatible or a corruption internal_error)
is NOT deleted, so it stays inspectable via codex_job_result. Deletion precedes
the response, so a response lost in transit does not restore the record; a failed
removal retains the record until its TTL (codex_job_status still shows it). Use
only when you no longer need to poll or re-read the job. Non-done jobs are not
deleted. Free — no model call.
detail works as in codex_job_result (#56).
Inputs: job_id (required), detail, workspace_root. Returns: ok
codex_job_listList background jobs (free)ARead-only
Deprecated: use amicus_job_list. List the background jobs known for this workspace, newest first.
Free — no model call. Use to recover job_ids lost across context compaction or
interruption. Returns each job's id, kind, status, start time, result_available,
result_ok (a done job's outcome — true/false/null; see codex_job_status), and expiry,
so a stored failure is triageable without fetching each result.
Returns every retained job by default; pass limit (1-1000) or status to narrow. They
narrow independently — omitting limit returns every job matching status, not every
job. Only an explicit limit truncates: when more jobs match, the response sets
truncated: true with a truncation_hint — the extra rows are dropped, not paged, so
omit limit to get them all rather than looking for a cursor.
Read a job's result promptly — a finished record can silently drop off. This list is
not permanent storage: terminal records expire after the TTL (default 24h), and a
per-workspace soft cap (default 50, clamped 1-1000) evicts the oldest terminal records
as new jobs start, so a finished job can disappear even before its expires_at.
Running jobs are never evicted, so a busy workspace can hold more than the cap — and
more than limit's 1000 ceiling.
Includes sync-originated records (any sync consult/review/delegate call); the cap/TTL
eviction covers both.
Inputs: limit, status, workspace_root. Returns: ok
codex_job_resultFetch job result (free)ARead-only
Deprecated: use amicus_job_result. Fetch a finished background Codex job's result WITHOUT deleting the record.
Works for any async job or sync consult/review/delegate (whose meta.job_id names
its record) — codex_delegate_async (a diff), codex_consult_async (a consult
answer), or codex_review_changes_async (a review with verdict). Use when
codex_job_status reports result_available=true; the envelope matches the job's
kind, so branch on tool. meta.job_id is set. A still-running/cancelled/timed-
out/failed job returns an error envelope — as does a done job whose stored result
this release cannot read (job_result_incompatible). To fetch and delete, use
codex_job_consume_result. Free — no model call.
detail="summary" (default) omits the raw model text; pass detail="full" for
the complete raw output and metadata (#56).
Inputs: job_id (required), detail, workspace_root. Returns: ok
codex_job_statusCheck job status (free)ARead-only
Deprecated: use amicus_job_status. Check a background job's lifecycle state without fetching the full result.
Use after any *_async call (codex_delegate_async, codex_consult_async,
codex_review_changes_async) or any sync consult/review/delegate (whose meta.job_id
names its record). Returns status, elapsed time, expiry, and result_available; when
it is true, call codex_job_result. result_ok reports a done job's producer-declared
outcome — true (success), false (a stored error envelope), or null (running, no stored
envelope, an unclassifiable payload, or a record finalized before this field) — so you
can spot a stored FAILURE without fetching it. It does not guarantee the payload is
still fetchable; a cross-release record may report an outcome yet fail codex_job_result
with job_result_incompatible. Free — no model call.
Honor poll_after_ms between polls — for a running job it GROWS with elapsed
runtime (bounded), so following it backs you off instead of tight-looping (a
delegate often runs ~20s). expires_at is null while running and is set once the
job finishes; results are then retained ttl_seconds past that completion.
Inputs: job_id (required), workspace_root. Returns: ok
codex_modelsList Codex models (free)ARead-only
Deprecated: use amicus_models. List Codex model slugs you can pass as model, with each model's advertised
reasoning-effort set for reasoning_effort. Free — no model call.
Advisory discovery only: read from Codex's on-disk cache when present, else a
bundled fallback (source says which; the fallback carries no effort data).
codex exec validates the real slug and the backend validates the real effort, so
an unlisted value may still work and a listed one may be unavailable to your
account. Same payload as the codex://models resource. Not fingerprint-stable — do
not cache it by the capabilities fingerprint.
Inputs: no named parameters. Returns: ok
codex_review_changesReview git changes (paid)A
Deprecated: use amicus_review_changes. Ask Codex (a different model) to review your git changes for an independent second opinion.
PAID — this spends Codex quota on every new call; use codex_dry_run or codex_status (both free) first if you only need to check scope or readiness.
scope: working_tree (tracked changes vs HEAD — untracked files follow the
untracked policy and are NOT reviewed by default), branch (needs base, reviews
base...HEAD), or commit (needs a commit SHA). The diff is gathered, secret-
redacted, and bounded by this server; Codex reviews it read-only and returns
structured findings. Pass workspace_root (absolute) for the right repo. Optional
extra_context (author intent, bounded like the diff) cuts false positives.
The result's top-level review_status and coverage disclose whether the model
actually ran and what it was shown: a pass over partial coverage is surfaced as
unknown, and a tree with nothing reviewable returns not_run, never a pass.
STATIC review, not a verify mode: the read-only sandbox blocks the writes a test/build/lint run needs, so Codex can't run the project's checks to confirm its findings — treat them as unvalidated claims you verify yourself before acting.
Data egress: this sends the gathered diff to OpenAI via the codex CLI. The diff is
secret-redacted (best-effort), but your extra_context and
developer_instructions are sent raw (unredacted).
Codex can read files outside the workspace — up to everything the OS user running it can
read — and send them to OpenAI. The sandbox bounds writes, not reads, so no choice of
workspace is a read boundary. Codex auto-loads the resolved workspace's
AGENTS.md and, in a repository, ancestor AGENTS.md files through its root, plus a
user-global $CODEX_HOME/AGENTS.override.md, else $CODEX_HOME/AGENTS.md; it discovers
skills in the
workspace's .agents/skills/ and user-global $CODEX_HOME/skills/ (default
~/.codex/skills/), reachable from outside the workspace. The plugin's isolation flags
don't suppress any of it.
A skill's name and description arrive up front; selecting one makes the model read
its body, which can reach OpenAI even if your inputs never mention it.
Redaction is not a guarantee. Do not rely on it to protect live credentials; keep
them out of the reviewed tree and your supplied inputs, or do not request a review
of that tree.
Progress & recovery: blocks up to the resolved deadline (timeout_seconds, clamped
10-600s; when omitted, the server-configured value, built-in default 300s). If that deadline
expires the run is terminated and its partial output is not recoverable or resumable, so for a
multi-file or whole-branch review that may exceed it, prefer codex_review_changes_async (a
background job, built-in default 1800s deadline; poll codex_job_status). Coarse
notifications/progress streams while it blocks when your client requests it; some MCP
clients background a long call before the deadline, so timeout_seconds bounds the run, not
necessarily the inline wait — either way the detached run (meta.job_id) is recoverable via
codex_job_list→codex_job_status→codex_job_result.
Inputs: base, model, paths, scope, +10 more. Returns: ok
codex_review_changes_asyncReview git changes in background (paid)A
Deprecated: use amicus_review_changes_async. Review your git changes in the background; get a job_id back immediately.
PAID — this spends Codex quota on every new call; use codex_dry_run or codex_status (both free) first if you only need to check scope or readiness.
Same read-only behavior as codex_review_changes (the diff is gathered, secret-
redacted, and bounded, then reviewed read-only), but detached — prefer it for a multi-file
or whole-branch review that can exceed the synchronous deadline (built-in default 300s),
since a sync run whose deadline expires loses its partial work; this job's own deadline is
separately configured (built-in default 1800s). The diff is gathered inside the job, so a bad
base/commit comes back as the same structured error with zero spend (a bad
scope is rejected by MCP input validation before the job starts). Starting a job commits to
spend. Poll codex_job_status; read/consume the review envelope with
codex_job_result/codex_job_consume_result; stop with codex_job_cancel. Pass
workspace_root (absolute).
Data egress: same as codex_review_changes — sends the secret-redacted diff plus
your raw (unredacted) extra_context and developer_instructions to OpenAI via
the codex CLI.
Codex can read files outside the workspace — up to everything the OS user running it can
read — and send them to OpenAI. The sandbox bounds writes, not reads, so no choice of
workspace is a read boundary. Codex auto-loads the resolved workspace's AGENTS.md and, in a
repository, ancestor AGENTS.md files through its root, plus a user-global
$CODEX_HOME/AGENTS.override.md, else $CODEX_HOME/AGENTS.md; it discovers skills in the
workspace's
.agents/skills/ and user-global $CODEX_HOME/skills/ (default ~/.codex/skills/),
reachable from outside the workspace. A skill's name
and description arrive up front; selecting one makes the model read its body, which
can reach OpenAI even if your inputs never mention it. Redaction is best-effort, not
a guarantee.
Inputs: base, model, paths, scope, +8 more. Returns: ok
codex_statusCheck Codex readiness (free)ARead-only
Deprecated: use amicus_backends. Check that the codex CLI is installed, authenticated, and a supported
version, and report the resolved defaults. Free — no model call. Run it before
your first paid call in a session to confirm setup, and again whenever a run
fails with a setup error.
Also reports a rate_limit block — how much of the Codex quota windows remains,
fetched LIVE from codex app-server (a read-only call with no model spend). primary
is the shorter/rolling window, secondary the longer one; the account reports only the
windows that currently bind it, so either may be null. Use it to decide whether to spend:
available is deliberately conservative (only when every reported window is healthy);
when limited/exhausted, prefer to defer non-urgent Codex calls (urgent ones may still
proceed); unknown means the live read couldn't complete just now (retry) or only a stale
cache was available; unavailable means this codex/account exposes no quota data — none
of these means anything is wrong.
blocked is different: the backend reports a SPEND control (spend_control_reached: true),
so paid calls will fail and waiting for a quota reset will NOT clear it — don't defer, and
surface it to the user. spend_control_reached is null when this codex/backend didn't report
that state (then available covers the quota windows only, and note says so).
is_stale/as_of show freshness; home_unverified flags a snapshot from a different
CODEX_HOME.
Inputs: no named parameters. Returns: ok
codex_transferTransfer session to Codex (free)A
Deprecated: amicus has no equivalent. Hand off the current Claude Code session to a resumable Codex thread.
Imports a Claude session transcript (.jsonl) into a persistent Codex thread via
codex app-server and returns resume_command (codex resume <thread_id>) to
continue that exact conversation in Codex (TUI or App). Free — no model call and no
token spend; it is a local file conversion, typically seconds. It does create a
thread in $CODEX_HOME (so it is not read-only) but never edits your working tree.
Pass transcript_path: the current session's transcript is the newest *.jsonl under
~/.claude/projects//. If that is ambiguous — for example, more than one recent
transcript could be the current session — ask the user which one to transfer. Transferring
a still-live session creates a NEW thread each call — Codex dedups only a byte-identical
transcript — so this is not idempotent for an active session.
Identifiers the app-server reports (the imported thread id and $CODEX_HOME) are validated:
a drifted, oversized, or malformed value fails as cli_contract_changed rather than
producing a corrupt resume_command or importing into the wrong home. resume_command is
POSIX shell syntax.
codex_status (free) can confirm Codex is installed and authenticated beforehand.
Inputs: transcript_path (required), workspace_root. Returns: ok
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Each tool has a clearly distinct role: the sync/async pairs (consult vs consult_async, delegate vs delegate_async, review_changes vs review_changes_async), the dry-run previews, and the job-lifecycle tools (status/result/consume/cancel/list) are all well-differentiated by their descriptions. The only mildly confusable pair is codex_job_result vs codex_job_consume_result, but the delete-vs-keep distinction is spelled out explicitly.
A consistent `codex_` prefix and snake_case are used throughout, with a predictable `_async` suffix for detached variants and a coherent `codex_job_*` namespace. Minor deviation: some tools are noun phrases (codex_status, codex_models, codex_capabilities) while most others are verb_noun (codex_consult, codex_delegate, codex_review_changes), so the verb convention is not perfectly uniform.
17 tools is on the heavier side but justified by the feature matrix: three operations (consult/review/delegate) each with sync, async, and sometimes dry-run forms, plus five shared job-management tools. Each tool earns its place, though the surface is larger than a minimal integration would need.
The surface covers the full Codex-integration lifecycle: readiness/status checks, model discovery, capability introspection, three paid operations in both sync and async form, dry-run previews, and complete background-job handling (list/status/result/consume/cancel). No obvious operational gaps remain; the only caveat is that every tool is deprecated in favor of an amicus_* successor, which is a migration concern rather than a coverage gap.
Maintenance
Related MCP Connectors
No-data MCP handoff for local Claude Code to Codex harness moves. $49 lifetime.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceIntegrates OpenAI Codex CLI with Claude Code via MCP, enabling code execution, analysis, fixing, and web search within Claude Code.1,656 npm1ISC
- AlicenseAqualityDmaintenanceEnables Claude Code to delegate tasks to OpenAI's Codex CLI (GPT-5.4) with structured execution traces, parallel execution, session persistence, and adversarial code review.15MIT
- AlicenseNot gradedqualityDmaintenanceMCP bridge for calling local coding-agent CLIs (Codex, Claude) from another agent, enabling bounded tasks like code review, verification, and bug hunting.MIT
- AlicenseBqualityDmaintenanceMCP bridge for using local Claude CLI as a bounded reviewer and analysis delegate for Codex.5MIT