Use Claude Code from inside Codex.
cc-plugin-codex is an open-source plugin that runs inside Codex and lets you use Claude Code and Claude models for review, rescue, and tracked background workflows.
This repository is maintained by Sendbird and follows the overall shape of openai/codex-plugin-cc, but in the opposite direction: Codex hosts the plugin and delegates work to Claude Code.
$cc:reviewfor a normal read-only Claude Code review$cc:adversarial-reviewfor a steerable challenge review$cc:rescue,$cc:status,$cc:result, and$cc:cancelto delegate work and manage tracked jobs$cc:setupto verify Claude Code readiness, hook installation, rescue-agent wiring, and review-gate state
The goal is to stay close to the upstream OpenAI plugin's UX, but Claude Code and Codex expose different runtime surfaces.
| Topic | openai/codex-plugin-cc |
This repository |
|---|---|---|
| Host app | Claude Code hosts the plugin | Codex hosts the plugin |
| User command surface | Claude slash commands such as /codex:review |
Codex skills such as $cc:review |
| Delegated runtime | Codex app-server + broker | Fresh claude -p subprocess per invocation |
| Review gate subject | Reviews the previous Claude response before Claude stops | Reviews the previous Codex response before Codex stops |
| Rescue agent | Plugin-local Codex rescue agent inside Claude | Global cc-rescue agent in ~/.codex/agents |
| Model / effort flags | Codex model names and Codex effort controls | Claude model names and Claude effort values: low, medium, high, max |
In addition to mirroring the upstream command surface, this repository adds a few implementation-focused optimizations:
- The stop-time review gate computes a turn baseline and skips Claude review entirely when the most recent Codex turn made no net edits, which helps avoid unnecessary token spend.
- Nested helper sessions suppress stop-time review and unread-result prompts, so the review gate stays attached to the user-facing Codex thread instead of recursive child runs.
- Background Claude jobs track unread/viewed state and session ownership, which makes
$cc:status,$cc:result, and follow-up rescue flows safer for concurrent work. - The installer is idempotent and manages the personal marketplace entry, hooks, and global
cc-rescueregistration together, so install and reinstall are a single step.
- Codex with hook support
- Node.js 18 or later
- Claude Code CLI installed and authenticated
claude auth login, orANTHROPIC_API_KEYset in the environment
Choose either install path below. Both install the plugin into ~/.codex/plugins/cc, create or update ~/.agents/plugins/marketplace.json, enable cc@local-plugins in ~/.codex/config.toml, enable codex_hooks = true, and install Codex hooks plus the global cc-rescue agent.
npx cc-plugin-codex installcurl -fsSL "https://raw.githubusercontent.com/sendbird/cc-plugin-codex/main/scripts/install.sh" | bashRerun either install command. The installer is safe to run again and will refresh the installed copy in place.
npx cc-plugin-codex update
curl -fsSL "https://raw.githubusercontent.com/sendbird/cc-plugin-codex/main/scripts/install.sh" | bashnpx cc-plugin-codex uninstall
curl -fsSL "https://raw.githubusercontent.com/sendbird/cc-plugin-codex/main/scripts/uninstall.sh" | bashIf you want to work from a local checkout instead of the one-shot installer:
mkdir -p ~/.codex/plugins
git clone https://github.com/sendbird/cc-plugin-codex.git ~/.codex/plugins/cc
cd ~/.codex/plugins/cc
node scripts/local-plugin-install.mjs install --plugin-root ~/.codex/plugins/ccIf Claude Code is not installed yet:
npm install -g @anthropic-ai/claude-code
claude auth loginThen run:
$cc:setup
After install, you should see:
- the
$cc:*skills listed in Codex - the global
cc-rescueagent installed under~/.codex/agents/cc-rescue.toml
One simple first run is:
$cc:review --background
$cc:status
$cc:result
Runs a normal Claude Code review on your current work.
Use it when you want:
- a review of your current uncommitted changes
- a review of your branch compared to a base branch like
main
It supports --base <ref>, --scope <auto|working-tree|branch>, --wait, --background, and --model <model>.
Examples:
$cc:review
$cc:review --base main
$cc:review --background
This command is read-only. When run in the background, use $cc:status to check progress and $cc:cancel to stop it.
Runs a steerable review that questions the chosen implementation and design.
Use it when you want:
- a review before shipping that challenges the direction, not just the code details
- review focused on design choices, tradeoffs, hidden assumptions, and alternative approaches
- pressure-testing around specific risk areas like auth, data loss, rollback, race conditions, or reliability
It uses the same target selection as $cc:review, including --base <ref>, and also accepts extra focus text after the flags.
Examples:
$cc:adversarial-review
$cc:adversarial-review --base main challenge whether this was the right caching and retry design
$cc:adversarial-review --background look for race conditions and question the chosen approach
This command is read-only. It does not fix code.
Hands a task to Claude Code through the global cc-rescue agent.
Use it when you want Claude Code to:
- investigate a bug
- try a fix
- continue a previous Claude task
- take a cheaper or faster pass with a smaller Claude model
It supports --background, --wait, --resume, --resume-last, --fresh, --write, --model <model>, --effort <low|medium|high|max>, and --prompt-file <path>.
Examples:
$cc:rescue investigate why the tests started failing
$cc:rescue fix the failing test with the smallest safe patch
$cc:rescue --resume apply the top fix from the last run
$cc:rescue --model sonnet --effort medium investigate the flaky integration test
$cc:rescue --background investigate the regression
Shows running and recent Claude Code jobs for the current repository.
Examples:
$cc:status
$cc:status task-abc123
Shows the final stored Claude Code output for a finished job.
When available, it also includes the Claude session ID so you can reopen that run directly with:
claude --resume <session-id>Examples:
$cc:result
$cc:result task-abc123
Cancels an active background Claude Code job.
Examples:
$cc:cancel
$cc:cancel task-abc123
Checks whether Claude Code is installed and authenticated.
It also verifies:
- hook installation
- global
cc-rescueregistration - current review-gate state for this workspace
$cc:setup --enable-review-gate
$cc:setup --disable-review-gate
When the review gate is enabled, the plugin uses a Stop hook to run a targeted Claude Code review based on Codex's previous response. If that review finds issues, the stop is blocked so Codex can address them first.
Warning
The review gate can create a long-running Codex/Claude loop and may drain usage limits quickly. Only enable it when you plan to actively monitor the session.
$cc:review --background
$cc:status
$cc:result
$cc:adversarial-review --background question the retry, rollback, and caching strategy
$cc:rescue fix the failing test with the smallest safe patch
$cc:rescue --resume apply the top fix from the last run
Apache-2.0