The Bridge · 11 min mission

Codex From Claude Code: The Official Plugin

Install the official OpenAI plugin and delegate review and rescue to Codex without leaving Claude Code.

tandemplugindelegationFact-checked 2026-06-13
On this page

You are deep in a Claude Code session. The implementation is done, but something nags: did this change open a security hole? Claude wrote the code, so Claude is the worst possible reviewer of it — same model, same blind spots, same context that already rationalized every decision. You want a second pair of eyes from a different model. Historically that meant opening a second terminal, starting Codex by hand, re-explaining the diff, and playing courier between two tools.

The official Codex plugin deletes that errand. You stay in Claude Code, type /codex:review, and OpenAI's Codex reviews the uncommitted diff against a fresh context — then hands the findings back to Claude to act on. The same plugin gives you /codex:rescue to farm out a gnarly investigation to a Codex subagent while you keep working, and a review gate that asks Codex to sign off every time Claude tries to stop.

Why delegate across tools at all

Three concrete wins, none of them available from a single agent talking to itself:

A second model. Codex is GPT-family; Claude is Claude. They fail differently. Asking the model that wrote a change to also approve it is a known weak spot — it tends to defend its own choices. A cross-model review catches the bugs your author-model talked itself past.

A second context window. Codex runs the review in its own session with its own fresh read of the repo. It is not anchored to the chain of reasoning that produced the code, so it judges the diff on its merits rather than on the story Claude told itself getting there.

An off-budget investigation. A --background rescue runs concurrently. You fire it at a flaky test or a mystery regression and keep building; you poll its status and pull the result when it lands, instead of blocking your main thread on a long dead-end hunt.

Install it: four commands, in order

The plugin installs through Claude Code's standard plugin flow [V]: add the marketplace by its GitHub owner/repo, install the plugin by its plugin@marketplace name, reload, then run the plugin's own setup check. Run these from inside a Claude Code session.

text
/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
/reload-plugins
/codex:setup

The plugin is named codex and its marketplace registers as openai-codex — that is why the install target is codex@openai-codex, not codex@codex-plugin-cc. Because it is a plugin, every command it ships is namespaced under codex: [V] — that prefix is Claude Code's conflict-avoidance for plugin skills, and it is also how you'll always know a command came from this plugin and not from Claude itself.

/codex:setup is the one that does real work: it verifies your local Codex CLI is installed and authenticated, and can auto-install it via npm if it is missing. It is also where you toggle the optional review gate (covered below).

The seven commands

The plugin ships exactly seven codex: commands [V]. Three do work (review, adversarial-review, rescue); three manage jobs (status, result, cancel); one is setup.

CommandWhat it does
/codex:reviewA read-only Codex review of your uncommitted changes (or a branch via --base). Codex reads, judges, and reports — it does not edit.
/codex:adversarial-reviewA steerable, challenge-mode review. Codex pushes back on design decisions and assumptions, and you can aim it with custom focus text.
/codex:rescueDelegate an investigation or an explicit fix to the codex:codex-rescue subagent — the workhorse, with the richest flag set (next section).
/codex:statusShow running and recent Codex jobs — your dashboard for anything launched with --background.
/codex:resultPrint the final output of a completed job, pulled back into the Claude session.
/codex:cancelCancel an active background Codex job.
/codex:setupVerify the Codex CLI is installed/authenticated; toggle the review gate on or off.
The seven commands the official Codex plugin adds to Claude Code, all namespaced under codex:.

Where the work actually runs

A common wrong mental model is that the plugin shells out to codex over raw bash and scrapes stdout. It does not. Delegation flows through the local Codex App Server [V] — the plugin talks to the Codex CLI and its app server running on the same machine — and that has two practical consequences worth internalizing.

First, it reuses your existing Codex config. The same ~/.codex/config.toml you already use for the standalone Codex CLI applies here: set model = "gpt-5.4-mini" and model_reasoning_effort = "high" there and every delegated job inherits those defaults. (A project-level .codex/config.toml is also honored for trusted projects.) You are not configuring a second, parallel Codex — you are pointing Claude Code at the one you've already set up.

Second, it reuses your existing Codex auth. The codex login you ran for the CLI is the same session the plugin rides on. No second token, no separate credential to manage inside Claude Code.

The rescue subagent: codex:codex-rescue

/codex:rescue is backed by a real Claude Code subagent named codex:codex-rescue [V]. That word matters. A Claude Code subagent runs in its own context window with its own system prompt and tool access, does its work independently, and returns only a final result to your main conversation [V] — so a long Codex investigation never floods the main thread with its intermediate logs. The plugin's subagent is the bridge: Claude's subagent machinery drives Codex on the other side.

You aim it with flags. The two axes that matter most are blocking vs. concurrent and continue vs. start-clean:

text
# Fire-and-keep-working: launch Codex in the background, return immediately
/codex:rescue --background investigate why the auth integration tests started failing

# Block until Codex finishes, then read the answer inline
/codex:rescue --wait find the root cause of the N+1 query on the orders page

# Continue the last Codex session (keep its context) vs. start a clean one
/codex:rescue --resume now propose the minimal fix
/codex:rescue --fresh re-investigate from scratch, ignore the previous run

# Pin the model and crank reasoning effort for a hard problem
/codex:rescue --model spark --effort high untangle this race condition
FlagEffect
--backgroundRun the rescue concurrently and return immediately. Track it with /codex:status, retrieve with /codex:result, kill with /codex:cancel.
--waitRun synchronously — block the session until Codex finishes, then surface the result inline.
--resumeContinue the latest Codex session, keeping its accumulated context (e.g. investigate, then ask it to fix).
--freshStart a new Codex session with no carried-over context.
--model <name>Pick the Codex model for this run — e.g. --model gpt-5.4-mini or the spark alias.
--effort <level>Set the reasoning effort, e.g. --effort high for a hard, worth-the-tokens problem.
Flags for /codex:rescue and the codex:codex-rescue subagent. Defaults come from ~/.codex/config.toml when a flag is omitted.

The review gate: a Stop hook with teeth (and a warning)

Here is the most opinionated feature, and the one to treat with the most respect. The plugin can install a review gate — a Claude Code Stop hook [V] — that fires every time Claude tries to end its turn. Instead of stopping, Claude hands the work to Codex for a review pass; if Codex flags problems, Claude keeps going to address them before it is allowed to stop.

You turn it on and off through setup:

text
/codex:setup --enable-review-gate
/codex:setup --disable-review-gate

The upside is a hard quality ratchet: nothing Claude does reaches "done" without a cross-model review. The danger is structural, and the plugin warns about it directly.

Senior scenario: a background rescue you don't wait on

You are mid-feature on a payments refactor when CI goes red on a test that has nothing to do with your branch — test_webhook_retry_backoff, intermittently failing, the kind of thing that eats an afternoon. You do not want to drop your refactor to chase it, and you do not want Claude (which is loaded with payments context) to context-switch into it either.

So you delegate it to Codex on a separate budget, in the background, and keep refactoring. Codex investigates in its own context; you poll when you reach a natural break; you pull the answer when it is ready.

fire a background rescue, keep working, collect the result
… scroll to run this session
Launch a --background Codex rescue, continue your own work, poll /codex:status, then retrieve with /codex:result. The investigation never touches your main context window.

Same goal, two costs

Without the plugin

  • Open a second terminal, start Codex by hand
  • Re-paste the diff / re-explain the failing test
  • Babysit it — your main thread is blocked or forgotten
  • Copy Codex's findings back into Claude manually
  • Two tools, two mental contexts, lots of courier work

With codex-plugin-cc

  • /codex:rescue --background … from inside Claude Code
  • Codex reads the repo itself, in its own context
  • You keep working; poll /codex:status when convenient
  • /codex:result pulls the answer into your thread
  • One tool, one session, two models on two budgets

Managing background Codex jobs

  1. Launch with --background

    Add --background to /codex:rescue (review commands accept it too). Claude returns immediately with a job started; Codex runs concurrently in its own session.

  2. Poll with /codex:status

    /codex:status lists running and recent jobs with their state and model. Check it at natural breaks — you are not blocked while it runs.

  3. Collect with /codex:result

    Once a job shows completed, /codex:result prints its final output back into your Claude session so Claude can act on it.

  4. Abort with /codex:cancel

    If the investigation is going nowhere or you no longer need it, /codex:cancel stops the active background job and stops the spend.

Try the cross-tool handoff

Cross-tool terminal simulator

Two terminals, one handoff. Flip who calls whom, pick a command, and press Run handoff to watch the caller delegate to the other tool and get a result back.

Direction

Hands the working diff to Codex for an independent review pass.

Claude Code
caller

idle — run a handoff

Codex
callee

idle — run a handoff

Command to run
/codex:review
Drive a simulated Claude Code session that delegates to Codex — install the plugin, fire a /codex:rescue, poll status, and pull the result, without spending a real token.

Knowledge check

You want Codex to chase a flaky test while you keep refactoring in the same Claude Code session, on a separate budget, without flooding your main context with its logs. Which approach matches the plugin?

The shape to build toward

Install once (/plugin marketplace add openai/codex-plugin-cc/plugin install codex@openai-codex/reload-plugins/codex:setup). Then reach for the right command by intent: /codex:review before you commit, /codex:adversarial-review when you want your assumptions attacked, and /codex:rescue --background when a hard investigation should run off to the side while you keep moving. Let ~/.codex/config.toml carry your model and effort defaults so you rarely type them. Turn the review gate on only for high-stakes stretches, watch it, and turn it off again. Two models, two contexts, two budgets — one terminal.

Reach the end and this star joins your charted sky.