Codex Plugin for Claude Code

Use Codex from inside Claude Code for code reviews or to delegate tasks to Codex.

26,854
Stars
1,623
Forks
80
Subscribers

What You Get

/codex:review

Normal read-only Codex review for your current work or branch comparison

/codex:adversarial-review

Steerable challenge review that questions implementation and design choices

/codex:rescue

Delegate tasks to Codex through the codex:codex-rescue subagent

/codex:transfer

Create persistent Codex thread from current Claude Code session

/codex:status

Shows running and recent Codex jobs for the current repository

/codex:cancel

Cancels an active background Codex job

Requirements

Before you begin, ensure you have:

  • ChatGPT subscription (incl. Free) or OpenAI API key. Usage will contribute to your Codex usage limits. Learn more
  • Node.js 18.18 or later

Install

Add the marketplace in Claude Code:

/plugin marketplace add openai/codex-plugin-cc

Install the plugin:

/plugin install codex@openai-codex

Reload plugins:

/reload-plugins

Then run:

/codex:setup

/codex:setup will tell you whether Codex is ready. If Codex is missing and npm is available, it can offer to install Codex for you.

If you prefer to install Codex yourself, use:

npm install -g @openai/codex

If Codex is installed but not logged in yet, run:

!codex login

Usage Examples

/codex:review

Runs a normal Codex review on your current work. Use it for reviews of uncommitted changes or branch comparisons.

/codex:review /codex:review --base main /codex:review --background

/codex:adversarial-review

Runs a steerable review that questions implementation and design choices.

/codex:adversarial-review /codex:adversarial-review --base main challenge whether this was the right caching design

/codex:rescue

Hands a task to Codex through the codex:codex-rescue subagent.

/codex:rescue investigate why the tests started failing /codex:rescue fix the failing test with the smallest safe patch

Comprehensive FAQ

Do I need a separate Codex account for this plugin?

If you are already signed into Codex on this machine, that account should work immediately here too. This plugin uses your local Codex CLI authentication.

If you only use Claude Code today and have not used Codex yet, you will also need to sign in to Codex with either a ChatGPT account or an API key. Codex is available with your ChatGPT subscription, and codex login supports both ChatGPT and API key sign-in. Run /codex:setup to check whether Codex is ready, and use !codex login if it is not.

Does the plugin use a separate Codex runtime?

No. This plugin delegates through your local Codex CLI and Codex app server on the same machine.

That means:

  • It uses the same Codex install you would use directly
  • It uses the same local authentication state
  • It uses the same repository checkout and machine-local environment
Will it use the same Codex config I already have?

Yes. If you already use Codex, the plugin picks up the same configuration.

If you want to change the default reasoning effort or the default model that gets used by the plugin, you can define that inside your user-level or project-level config.toml. For example to always use gpt-5.4-mini on high for a specific project you can add the following to a .codex/config.toml file at the root of the directory you started Claude in:

model = "gpt-5.4-mini" model_reasoning_effort = "high"
Can I keep using my current API key or base URL setup?

Yes. Because the plugin uses your local Codex CLI, your existing sign-in method and config still apply.

If you need to point the built-in OpenAI provider at a different endpoint, set openai_base_url in your Codex config.

How do I move work over to Codex?

Delegated tasks and any stop gate run can also be directly resumed inside Codex by running codex resume either with the specific session ID you received from running /codex:result or /codex:status or by selecting it from the list.

This way you can review the Codex work or continue the work there.

What does the review gate do?

You can enable the review gate using /codex:setup --enable-review-gate. When the review gate is enabled, the plugin uses a Stop hook to run a targeted Codex review based on Claude's response. If that review finds issues, the stop is blocked so Claude can address them first.

Warning: The review gate can create a long-running Claude/Codex loop and may drain usage limits quickly. Only enable it when you plan to actively monitor the session.

What are the typical workflows for using this plugin?

Review Before Shipping:

/codex:review

Hand A Problem To Codex:

/codex:rescue investigate why the build is failing in CI

Start Something Long-Running:

/codex:adversarial-review --background /codex:rescue --background investigate the flaky test

Then check in with:

/codex:status /codex:result
How do I manage background jobs?

You can use /codex:status to check on the progress of background jobs and /codex:cancel to cancel ongoing tasks.

For example:

/codex:status /codex:status task-abc123 /codex:cancel /codex:cancel task-abc123
How do I see the results of completed Codex jobs?

Use /codex:result to show the final stored Codex output for a finished job. When available, it also includes the Codex session ID so you can reopen that run directly in Codex with codex resume .

/codex:result /codex:result task-abc123
What is the difference between normal review and adversarial review?

Normal Review (/codex:review): Gives you the same quality of code review as running /review inside Codex directly. It's good for reviewing current uncommitted changes or branch comparisons.

Adversarial Review (/codex:adversarial-review): A steerable review that questions the chosen implementation and design. It can be used to pressure-test assumptions, tradeoffs, failure modes, and whether a different approach would have been safer or simpler.