OpenAI's Codex plugin hands your code review to a second LLM

OpenAI's Codex plugin runs inside Claude Code to delegate code review, adversarial critique, and tasks to Codex locally.

OpenAI's Codex plugin hands your code review to a second LLM
Share

Letting the model that wrote your code also sign off on it is a structural weakness, not a shortcut. OpenAI's new Claude Code plugin fixes that by handing the review to a rival model running on your own machine.

What the Codex plugin does that a single LLM review misses

What the Codex plugin does that a single LLM review misses (source: codex.danielvaughan.com)

When one model writes the code and then reviews it, the reviewer and the author share the same training-level blind spots — the same-weight anti-pattern that makes self-review structurally weak, because both passes carry identical assumptions and the reviewer tends to perpetuate the author's errors . The openai/codex-plugin-cc plugin — version 1.0.6, released July 8 2026, Apache-2.0 licensed, with roughly 29.7k stars — routes review work to a Codex process running locally, adding a different vendor, a different training corpus, and different failure modes to the loop, so the two agents catch mistakes the other would miss.

"When reviewer and author share weights, both passes share identical blind spots and the reviewer perpetuates the author's errors." — from an independent teardown of codex-plugin-cc (source: Daniel Vaughan).

Two read-only modes ship out of the box: /codex:review runs a standard diff pass (supporting --base <ref>, foreground or background), and /codex:adversarial-review runs a harder pass targeting assumptions, auth paths, data-loss risks, race conditions, and rollback coverage . This is local and immediate — distinct from Anthropic's managed Code Review, announced March 9 2026, which runs multiple agents per PR at roughly $15–25 and ~20 minutes each, lifting substantive review comments from 16% to 54% internally with under 1% of findings marked incorrect . The cross-vendor edge isn't benchmark-proven superiority; it's genuine complementarity, most defensible on multi-file diffs, risky architectural changes, and security-sensitive paths.

What to have ready before activating the plugin

Screenshot of https://code.claude.com/docs/en/hooks

Before you touch a single slash command, four things must already exist on your machine — the plugin adds no new project secrets and makes no independent remote API calls; it wraps your local Codex install and reuses whatever auth and config are already there .

  • Node.js 18.18 or later on your PATH. The plugin ships a Node companion, codex-companion.mjs, that parses arguments, discovers git state, and stores job records under jobs/<job-id>.json .
  • Auth: a ChatGPT subscription (Free tier is enough) or an OpenAI API key. If Codex has never been authenticated on the machine, run codex login before invoking the plugin .
  • The global codex binary. The plugin wraps your existing install rather than calling OpenAI directly. If it's missing, /codex:setup can install it, or run npm install -g @openai/codex (or the curl -fsSL https://chatgpt.com/codex/install.sh | sh installer) .

Everything else — your config.toml, MCP servers, sandbox settings, and repo checkout — is reused as-is, so there is nothing extra to wire into the project itself.

Activating the Codex plugin in Claude Code

Activating the Codex plugin in Claude Code

With the codex binary in place, wiring the plugin into a session is four commands. Run each inside an active Claude Code session, in order:

  1. Add the marketplace source: /plugin marketplace add openai/codex-plugin-cc .
  2. Install the plugin into the session: /plugin install codex@openai-codex .
  3. Reload the registry: /reload-plugins. Claude Code has to pick up the new /codex: slash commands before any of them are callable.
  4. Verify install and auth: /codex:setup. It confirms the global codex binary is present and authenticated, and can optionally enable the review gate (covered next) .

Run your first pass with /codex:review. By default it reviews staged and unstaged changes against the working tree, with untracked content capped at 24 KiB . Use /codex:review --base <ref> to diff against a specific branch or commit; a clean working tree triggers auto-detection against the default branch .

Reasoning depth is tuned in Codex's own config, not the plugin. Set model_reasoning_effort in ~/.codex/config.toml (user-wide) or .codex/config.toml (project); accepted values are none, minimal, low, medium, high, and xhigh . Project-level config loads only when the file is explicitly trusted, so an untrusted repo's .codex/config.toml stays inert.

A realistic heads-up: dual provider spend, the stop-gate, and large-diff pace

Running the plugin means two billing meters ticking at once: Anthropic for the Claude Code session and OpenAI for every Codex job. The plugin makes no remote calls of its own — it wraps your local codex binary, so usage counts against your Codex limits . Neither provider offsets the other; you pay both independently.

The optional review gate deserves caution. Enabling it with /codex:setup --enable-review-gate registers a Stop hook with a 900-second timeout that runs a Codex pass on Claude's response; if Codex finds issues, it blocks Claude from stopping until they are addressed .

The README warns this "can create long-running Claude/Codex loops that drain usage limits" — a design note worth reading before you flip the gate on for a busy repo (source: codex-plugin-cc README).

Pace matters too. The companion processes one streaming request at a time , so run large multi-file diffs in the background and poll with /codex:status, then fetch output via /codex:result. The Node codex-companion.mjs and the Codex app server add local process overhead that competes with the sandbox for memory on low-RAM laptops. Under the hood the app-server protocol is JSON-RPC 2.0 over stdio JSONL using thread/start and turn/start primitives — useful context when inspecting jobs/<job-id>.json if a review hangs.

Going further: /codex:adversarial-review, /codex:rescue, and /codex:transfer

Once the standard review path is comfortable, three commands extend the plugin from passive critique to steerable, write-capable delegation. /codex:adversarial-review is a read-only pass that accepts a free-text focus argument, letting you point Codex at specific concerns — auth flows, data-loss paths, race conditions, or rollback safety — and it is framed to challenge your implementation's assumptions and tradeoffs rather than lint the diff . Run it after a clean standard review when you want deliberate pushback.

/codex:rescue hands a debug or implementation task entirely to Codex through the codex-rescue subagent, defaulting to write-capable runs unless you request read-only . Because it can modify files, scope control matters — restrict it with a focused prompt. /codex:transfer creates a persistent Codex thread from the current session for async handoffs; track state with /codex:status (queued → running → success/failed/cancelled), pull output with /codex:result, and abort with /codex:cancel. To lock a per-project capability/cost tradeoff, set the model alias spark, which maps to gpt-5.3-codex-spark, alongside model_reasoning_effort in config.toml .

CommandAccessPrimary use
/codex:reviewread-onlyStandard second-model review of changes or a branch
/codex:adversarial-reviewread-onlySteerable critique of assumptions, auth, races, rollback
/codex:rescuewriteDelegate a debug/implementation task to Codex
/codex:transferwriteCreate a persistent Codex thread for async handoff
/codex:statusread-onlyCheck job lifecycle state
/codex:resultread-onlyRetrieve a job's output
/codex:cancelread-onlyAbort a running or queued job
/codex:setupread-onlyVerify install/auth; toggle the review gate

The practical takeaway: reach for the review commands for verification, /codex:rescue only with a tight prompt since it edits files, and /codex:transfer when a task should outlive the current session. Together they turn a single Claude Code terminal into a two-vendor workflow you steer command by command .

Frequently asked questions

Does the plugin make its own API calls or use my existing Codex setup?

It uses your existing setup. The plugin does not make independent remote API calls; it wraps the global codex binary already installed on your machine and reuses your local authentication, config.toml, MCP servers, sandbox settings, and repository checkout . No new secrets or API keys are introduced by the plugin itself — whatever authenticates your local Codex runtime is what the plugin routes work through.

Do I need a paid OpenAI plan?

No. A ChatGPT account on the Free tier is sufficient, and an OpenAI API key also works as an alternative . The one hard requirement is that codex login has been run so the binary is authenticated; usage then counts against your Codex limits. Node.js 18.18+ is the other baseline requirement .

What's the difference between /codex:review and /codex:adversarial-review?

/codex:review is a standard, read-only diff pass — the README states it gives the same quality of review as running /review inside Codex directly, over current uncommitted changes or a branch via --base <ref> . /codex:adversarial-review is also read-only but accepts focus text and is deliberately structured to challenge the implementation: assumptions, tradeoffs, auth paths, data-loss risks, race conditions, rollback coverage, and reliability, rather than only linting the diff .

What does the review gate do and should I enable it?

The optional review gate, enabled with /codex:setup --enable-review-gate, registers a Stop hook with a 900-second timeout that prevents Claude from ending its turn if Codex finds issues, forcing them to be addressed first . The README explicitly warns this can create long-running Claude/Codex loops that drain usage limits . Treat it as opt-in for cases where you want a hard blocking gate — not a default.

How is this different from Anthropic's Code Review feature?

They solve different parts of the problem. Anthropic's managed Code Review, announced March 9, 2026, runs multiple agents per pull request on Anthropic's infrastructure, averages roughly 20 minutes at about $15–25 per review, and targets Team and Enterprise users . The Codex plugin is local, immediate, and cross-vendor — it orchestrates a second provider inside your existing Claude Code session and meters through your own OpenAI account . One is a managed PR service; the other is in-terminal, per-session model diversity.

Enjoyed this article? Subscribe to get new stories by email whenever they're published.

Subscribe