How to use Codex inside Claude Code

The official Codex plugin gives Claude Code four moves: delegate a hard fix, run several Codex jobs in the background while you keep working, get a second-opinion review from a different model family, or hand the whole conversation over as a persistent Codex session.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

Install the plugin from the openai-codex marketplace, run /codex:setup, then use rescue for implementation, the review commands for independent scrutiny, and transfer when Codex should inherit the whole conversation. Background jobs keep Claude as the orchestrator while Codex works in parallel. Both providers bill you separately.

What you need to know
  • The plugin drives the Codex CLI using your existing local Codex sign-in, configuration, repository, and tools.
  • /codex:rescue is the implementation command. Add --background when Claude should keep coordinating other work.
  • /codex:status, /codex:result, and /codex:cancel keep background jobs from disappearing on you.
  • /codex:review is a fixed read-only pass. /codex:adversarial-review is the steerable one.
  • /codex:transfer turns the Claude conversation into a resumable Codex session.
  • No shared billing. Each side keeps its own authentication and limits, so parallel work drains both pools.

What the Codex plugin changes

The plugin is an orchestration bridge. You stay in Claude Code, type a slash command, and the plugin hands the local Codex tooling a bounded job. Codex sees the same repository and the same local environment. Claude keeps the conversation and decides what to do with whatever comes back.

That separation is the whole point. A rescue job chases a stubborn failure without replacing your Claude session. A review reads the current diff from a different model family. A transfer deliberately ends the worker pattern and turns the Claude transcript into a durable Codex conversation. Three commands because those are three different risk and context profiles.

It is not a shared billing layer. The plugin uses your local Codex sign-in, which is either a qualifying ChatGPT subscription or an OpenAI API key, while Claude Code goes on using its own. A parallel Codex job is extra provider usage, not free capacity hiding inside your Claude allowance.

Install the official plugin

You need Node.js 18.18 or newer and Codex authentication, either through a ChatGPT plan that includes Codex or an OpenAI API key. You do not necessarily need the Codex CLI installed first: /codex:setup offers to install it when npm is available.

01

Add the OpenAI marketplace

Run the marketplace command from Claude Code. This registers the official plugin source.

02

Install and reload the plugin

Install the codex plugin from the openai-codex marketplace, then reload plugins so the slash commands appear.

03

Run setup

Use /codex:setup. It checks the local Codex CLI and authentication path, and can guide installation when npm is present.

04

Confirm Codex authentication

If setup asks for it, sign in with the Codex CLI. API-key users can configure the standard OpenAI API-key environment instead.

Run these commands inside Claude Code
/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
/reload-plugins
/codex:setup

Prefer to install the CLI yourself? OpenAI documents the npm install and codex login. Run /codex:setup afterward anyway. It validates the bridge, not just the presence of an executable on your PATH.

Optional manual Codex CLI installation
npm install -g @openai/codex
codex login

Delegate a fix with rescue

/codex:rescue is the implementation command. Give it three things: the failure, the outcome you want, and the boundary it must not cross. In the foreground Claude waits for Codex to finish, which is what you want when the result blocks your next decision or the change is small enough to read on the spot.

Foreground rescue
/codex:rescue Fix the failing pagination test. Preserve the public API and run only the focused test file.

Use --background when the work is genuinely independent. Claude carries on reading another subsystem, drafting a test plan, or launching a second job while Codex grinds. The plugin stores the job so you can query it later. --wait is the explicit foreground choice when you want the command to block.

Background rescue with an explicit model and effort
/codex:rescue --background --model <model-id> --effort high Investigate the race in the upload worker. Make the smallest safe fix and run the worker tests.

Rescue threads also take --resume and --fresh. Resume continues the latest rescue thread for this repository, which is right for a follow-up in the same investigation. Fresh starts clean, which is right when prior context would bias the answer or the next task is unrelated. Omit --model and --effort and Codex falls back to its configured defaults.

Manage a fleet of background jobs

Background delegation only helps while job state stays visible. Three commands do that. Status lists running and recent jobs for the repository. Result pulls the stored final output and, where available, the Codex session ID. Cancel kills an active job.

Inspect, retrieve, or stop a background job
/codex:status
/codex:status <job-id>
/codex:result <job-id>
/codex:cancel <job-id>

Divide a fleet by ownership boundary, never by vague topic. One job diagnoses the database deadlock, another reviews the API diff, Claude takes the UI regression. Each worker gets an explicit directory or file set, a verification command, and a stop condition. If two jobs could write the same file, create the worktrees before you launch either one.

Collect every result before you merge any conclusion. A green Codex job means its own task finished. It says nothing about whether the combined change is safe. Claude reads the diff, checks the result against the original constraints, and runs the integration-level checks that no single worker owned.

Ask Codex for a second-opinion review

/codex:review runs Codex read-only. It reads uncommitted work, or compares the branch against a base ref when you pass --base. Add --background if Claude has other work to get on with, or --wait when the review is the next gate.

Standard review examples
/codex:review
/codex:review --base main --background
/codex:review --base origin/main --wait

The standard review takes no custom focus and cannot be steered. That is a feature: an unsteerable pass over correctness, regressions, and missing tests cannot be talked into agreeing with you. When you do want to aim it at a specific claim, threat model, or design choice, use /codex:adversarial-review, which is also read-only but accepts focus text.

Steer an adversarial review
/codex:adversarial-review --base main Focus on tenant isolation, authorization bypasses, and rollback safety.

Keep the roles separate and the loop holds up. Codex reports findings with file and line evidence. Claude validates each finding against the code. Only then does an implementation worker touch the tree. Skip the middle step and an unconfirmed reviewer hunch becomes a day of code churn.

Transfer the whole Claude session to Codex

/codex:transfer is about continuity, not a bounded task. It imports the current Claude Code transcript into a persistent Codex thread and prints a codex resume command. OpenAI documents this as Codex's external-agent session importer, so the conversation shows up in the Codex App and the Codex terminal interface.

Transfer the current Claude session
/codex:transfer

By default the plugin gets the transcript from its Claude Code session hook. You can point it at one instead with --source, as long as the file sits under ~/.claude/projects. That restriction is deliberate: the plugin will not import an arbitrary JSONL file from anywhere on disk.

Transfer an explicit Claude transcript
/codex:transfer --source ~/.claude/projects/<project>/<session>.jsonl

Transfer when Codex should own the next phase and needs the reasoning Claude already accumulated. Do not transfer to ask one question. Rescue and review draw cleaner boundaries around short jobs; transfer leaves you with a second long-lived conversation to manage.

Choose model, effort, and the right worker

Pin model and effort when the job has a clear cost or reasoning profile. A hard concurrency bug, a cross-module refactor, or an ambiguous test failure earns high effort. A bounded search or a mechanical update does not. The plugin passes --model and --effort through to rescue; project and user defaults live in Codex configuration.

A practical routing guide

WorkKeep in ClaudeRoute to Codex
Conversation ownershipRequirements, tradeoffs, user decisionsA persistent transferred phase
ImplementationSmall change already in contextHard debugging or a bounded implementation job
ReviewValidate findings and reconcile constraintsIndependent or adversarial second opinion
Parallel workCoordinate scope and integrationIsolated background tasks in separate worktrees

The question is never which model is better. It is whether the task gains anything from a second independent context and reasoning pass. Taste-sensitive product decisions and unresolved requirements stay with the agent holding the conversation. Well-specified investigations, implementations, and reviews go out, because independence helps them.

Before you launch any worker, answer three things: who owns the final diff, which test proves the job is done, and whether the output is advice or an authorized edit. When several agents share one project, that ownership question decides the outcome far more than model choice does.

Questions people ask

Yes. It is published in the openai/codex-plugin-cc repository and installed from the openai-codex Claude Code plugin marketplace.

Not necessarily. The plugin needs Codex CLI access, but /codex:setup offers to install it for you when npm is available. Installing @openai/codex globally and running codex login yourself also works.

--background starts a stored job and returns control to Claude Code. --wait keeps the command in the foreground until Codex completes. Use status and result to inspect a background job later.

Yes, through rescue. That is an implementation workflow and it writes to the repository. The review and adversarial-review commands are read-only. Give each agent its own worktree whenever two of them can write at once.

Use /codex:status to list jobs or inspect one job, /codex:result to retrieve its final stored output, and /codex:cancel to stop an active job.

When you need to aim it. Normal review is a fixed, unsteerable general pass. Adversarial review accepts focus text, so use it for a threat model, a disputed assumption, rollback risk, or any specific claim you want attacked.

No. It imports the Claude transcript into a persistent Codex session and nothing else. Your repository files stay exactly where they are, so check git state before you resume the new Codex thread.

No. The plugin uses local Codex authentication, while Claude Code uses its own provider authentication. Each provider applies its own plan, API billing, and rate limits.

Sources

Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. openai/codex-plugin-cc the commands, flags, and transfer source-path rule
  2. OpenAI Codex: authentication ChatGPT plan sign-in and API-key setup
  3. OpenAI Codex: configuration basics where model and effort defaults live
Try it

Claude Code and Codex,
side by side.

Continuum gives each agent an isolated session, visible provider limits, parallel worktrees, and one place to compare what they came back with.

free app · your subscriptions · local-first