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.
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.
/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
/reload-plugins
/codex:setupThe 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.
| Command | What it does |
|---|---|
/codex:review | A read-only Codex review of your uncommitted changes (or a branch via --base). Codex reads, judges, and reports — it does not edit. |
/codex:adversarial-review | A steerable, challenge-mode review. Codex pushes back on design decisions and assumptions, and you can aim it with custom focus text. |
/codex:rescue | Delegate an investigation or an explicit fix to the codex:codex-rescue subagent — the workhorse, with the richest flag set (next section). |
/codex:status | Show running and recent Codex jobs — your dashboard for anything launched with --background. |
/codex:result | Print the final output of a completed job, pulled back into the Claude session. |
/codex:cancel | Cancel an active background Codex job. |
/codex:setup | Verify the Codex CLI is installed/authenticated; toggle the review gate on or off. |
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:
# 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| Flag | Effect |
|---|---|
--background | Run the rescue concurrently and return immediately. Track it with /codex:status, retrieve with /codex:result, kill with /codex:cancel. |
--wait | Run synchronously — block the session until Codex finishes, then surface the result inline. |
--resume | Continue the latest Codex session, keeping its accumulated context (e.g. investigate, then ask it to fix). |
--fresh | Start 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. |
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:
/codex:setup --enable-review-gate
/codex:setup --disable-review-gateThe 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.
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:statuswhen convenient /codex:resultpulls the answer into your thread- One tool, one session, two models on two budgets
Managing background Codex jobs
Launch with --background
Add
--backgroundto/codex:rescue(review commands accept it too). Claude returns immediately with a job started; Codex runs concurrently in its own session.Poll with /codex:status
/codex:statuslists running and recent jobs with their state and model. Check it at natural breaks — you are not blocked while it runs.Collect with /codex:result
Once a job shows completed,
/codex:resultprints its final output back into your Claude session so Claude can act on it.Abort with /codex:cancel
If the investigation is going nowhere or you no longer need it,
/codex:cancelstops 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.
Hands the working diff to Codex for an independent review pass.
idle — run a handoff
idle — run a handoff
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.