Codex Plugin for Claude Code (openai/codex-plugin-cc)
Overview
codex-plugin-cc is an official OpenAI plugin that integrates the OpenAI Codex CLI directly into the Claude Code developer workflow. It allows Claude Code users to trigger Codex-powered code reviews, adversarial design challenges, and background task delegation — all without ever leaving the Claude Code interface.
The plugin bridges two powerful AI coding agents: Anthropic's Claude Code and OpenAI's Codex CLI, enabling a "second opinion" and multi-agent collaborative workflow.
Why It Exists
Claude Code is an excellent agentic coding tool, but using Codex alongside it previously required switching contexts and manually invoking separate tools. This plugin eliminates that friction:
- Codex is particularly strong at detailed, skeptical code review
- Running two independent AI models over the same code catches more issues than one alone
- Users can keep Claude Code as their primary interface while offloading specific jobs to Codex
Requirements
| Requirement | Details |
|---|---|
| Authentication | ChatGPT subscription (Free tier included) or OpenAI API key |
| Node.js | v18.18 or later |
| Codex CLI | Installed globally via npm install -g @openai/codex |
Usage counts toward your existing Codex usage limits.
Installation
# 1. Add the marketplace source inside Claude Code
/plugin marketplace add openai/codex-plugin-cc
# 2. Install the plugin
/plugin install codex@openai-codex
# 3. Reload plugins
/reload-plugins
# 4. Verify setup
/codex:setup
If Codex CLI is not installed, /codex:setup can optionally install it automatically via npm.
Core Commands
/codex:review
Runs a standard, read-only Codex code review on your current uncommitted changes or a branch diff.
/codex:review # review uncommitted changes
/codex:review --base main # review against main branch
/codex:review --background # run in background (recommended for large diffs)
Use case: Pre-ship sanity check, multi-file change review.
/codex:adversarial-review
A steerable, opinionated review that challenges your implementation choices — not just surface-level code style. It questions assumptions, tradeoffs, failure modes, and alternative approaches.
/codex:adversarial-review
/codex:adversarial-review --base main challenge whether the caching strategy is correct
/codex:adversarial-review --background look for race conditions
Use case: Pre-launch reviews, architecture audits, stress-testing design decisions around auth, data loss, rollback, and reliability.
/codex:rescue
Delegates a task to Codex as a background sub-agent (codex:codex-rescue). Codex will investigate bugs, apply fixes, or continue from a previous session.
/codex:rescue investigate why the tests started failing
/codex:rescue fix the failing test with the smallest safe patch
/codex:rescue --model gpt-5.4-mini --effort medium investigate the flaky test
/codex:rescue --background investigate the regression
/codex:rescue --resume apply the top fix from the last run
You can also use natural language:
Ask Codex to redesign the database connection to be more resilient.
Supported flags: --background, --wait, --resume, --fresh, --model, --effort
/codex:status
Lists running and recently completed Codex jobs for the current repository.
/codex:status
/codex:status task-abc123
/codex:result
Retrieves the output of a finished Codex job. Also returns the Codex session ID for reopening directly in the Codex CLI.
/codex:result
/codex:result task-abc123
/codex:cancel
Cancels an active background Codex task.
/codex:cancel
/codex:cancel task-abc123
/codex:setup
Checks Codex installation and authentication status. Also manages the optional review gate.
/codex:setup --enable-review-gate # auto-review every Claude response via Codex Stop hook
/codex:setup --disable-review-gate
⚠️ The review gate can create a long-running Claude/Codex feedback loop and drain usage limits quickly. Monitor sessions actively when enabled.
Typical Workflows
1. Review Before Shipping
/codex:review
2. Hand Off a Hard Problem
/codex:rescue investigate why the build is failing in CI
3. Long-Running Background Work
/codex:adversarial-review --background
/codex:rescue --background investigate the flaky test
# Later check in:
/codex:status
/codex:result
Configuration
The plugin inherits Codex CLI configuration from ~/.codex/config.toml (user-level) or .codex/config.toml (project-level).
Example project-level config to always use gpt-5.4-mini at xhigh effort:
model = "gpt-5.4-mini"
model_reasoning_effort = "xhigh"
Custom openai_base_url is also supported for custom API endpoints.
Architecture
The plugin wraps the Codex App Server and delegates all work to the globally installed Codex CLI binary on the same machine. This means:
- No separate Codex runtime is introduced
- Authentication state is shared with any existing Codex installation
- Repository checkout and environment are identical to direct Codex usage
- Results from
/codex:resultinclude session IDs that can be resumed directly withcodex resume <session-id>
FAQ
Q: Do I need a separate Codex account?
No. If you are already signed into Codex CLI on the machine, the plugin reuses that authentication.
Q: Does the plugin use a separate Codex runtime?
No. It delegates through your existing local Codex CLI and app server.
Q: Can I use my existing API key or custom base URL?
Yes. The plugin picks up your Codex CLI config including openai_base_url.
Summary
codex-plugin-cc represents an interesting convergence in the AI coding tool ecosystem: an official OpenAI tool designed to extend a competing product (Claude Code). It enables a powerful multi-agent review workflow where Claude writes and iterates on code while Codex provides independent scrutiny — catching issues that a single model might miss.