DEV Community

Cover image for Open Source Project #115: codex-plugin-cc — Use OpenAI Codex Directly Inside Claude Code
WonderLab
WonderLab

Posted on

Open Source Project #115: codex-plugin-cc — Use OpenAI Codex Directly Inside Claude Code

Introduction

"Use Codex from Claude Code to review code or delegate tasks."

This is article #115 in the "One Open Source Project a Day" series. Today's project is codex-plugin-cc — an official plugin from OpenAI that lets you invoke OpenAI's Codex coding agent directly from within your Claude Code workflow.

The existence of this plugin is itself worth noting: OpenAI officially built and maintains a plugin for Anthropic's Claude Code. Two companies that are direct competitors at the model layer decided that cross-vendor agent collaboration is a real use case worth building for. That's a signal about where the AI coding ecosystem is heading.

24,582 Stars. Created in March 2026. Less than four months old.

What You'll Learn

  • The 7 core commands and when to use each
  • Why /codex:adversarial-review is the most distinctive command
  • How the Review Gate (Stop Hook) works — and why it's risky
  • Background job execution and async result retrieval
  • Session transfer: carrying Claude Code context into Codex

Prerequisites

  • Basic experience with Claude Code commands and plugins
  • Familiarity with the concept of AI coding agents
  • Basic understanding of OpenAI Codex CLI

Project Background

Overview

codex-plugin-cc is an official OpenAI plugin that bridges Claude Code and the locally-installed Codex CLI (@openai/codex). After installation, you can type /codex:review, /codex:rescue, and similar commands from within your active Claude Code session — delegating code reviews or task execution to Codex without leaving your terminal, switching tools, or copying context across.

The plugin uses the same local authentication as Codex itself (a ChatGPT subscription — including Free tier — or an OpenAI API key). Configuration is managed via TOML files: ~/.codex/config.toml for user-level settings, .codex/config.toml for project-level overrides.

Author / Team

  • Author/Org: OpenAI
  • Language: JavaScript
  • License: Apache 2.0
  • Version: 1.0.5

Project Stats

  • ⭐ GitHub Stars: 24,582+
  • 🍴 Forks: 1,487+
  • 📄 License: Apache 2.0
  • 📅 Created: March 30, 2026

Features

Installation

# Step 1: Add from marketplace
/plugin marketplace add openai/codex-plugin-cc

# Step 2: Install
/plugin install codex@openai-codex

# Step 3: Reload
/reload-plugins

# Step 4: Verify environment (checks Codex installation and auth)
/codex:setup
Enter fullscreen mode Exit fullscreen mode

7 Core Commands

/codex:review — Standard Code Review

Read-only. Codex reviews your uncommitted changes, or a diff against a specified base branch.

/codex:review
/codex:review --base main
/codex:review --background    # run in background; don't block Claude
Enter fullscreen mode Exit fullscreen mode

Not steerable — once triggered, Codex runs its standard review flow and outputs findings.

/codex:adversarial-review — Adversarial Review

This is the most distinctive command in the plugin. It doesn't check for bugs — it questions the decisions themselves:

  • Challenges design choices
  • Questions tradeoffs
  • Probes underlying assumptions
  • Identifies failure modes

And it's steerable — you can direct its focus:

/codex:adversarial-review focus on our error handling assumptions
/codex:adversarial-review question whether this abstraction is premature
/codex:adversarial-review --background
Enter fullscreen mode Exit fullscreen mode

The distinction from regular review: /codex:review answers "is there a bug here?" — /codex:adversarial-review answers "is this the right direction, and will this design become technical debt in three months?"

/codex:rescue — Delegate a Task to Codex

The heaviest command. You hand an entire task to Codex — it independently investigates, writes code, and attempts fixes on your local repository.

/codex:rescue investigate this bug and try a fix
/codex:rescue continue what you were doing last time
/codex:rescue --model spark          # use gpt-5.3-codex-spark (fast)
/codex:rescue --model gpt-5.4        # use a stronger model
/codex:rescue --effort high          # increase reasoning effort
/codex:rescue --background           # run async; Claude stays unblocked
/codex:rescue --resume               # resume the previous Codex task
/codex:rescue --fresh                # force a new task (ignore prior state)
Enter fullscreen mode Exit fullscreen mode

--background is the key flag: Codex runs in the background, Claude Code is not blocked, and you can continue working. Retrieve the result later with /codex:result.

Model shortcuts: spark maps to gpt-5.3-codex-spark (fast mode). Full model names also work: gpt-5.4-mini, gpt-5.4.

/codex:transfer — Session Transfer

Exports the current Claude Code session as a persistent Codex thread:

/codex:transfer
Enter fullscreen mode Exit fullscreen mode

Output:

codex resume <session-id>
Enter fullscreen mode Exit fullscreen mode

Take that command to your terminal and Codex picks up with the full session history. Useful when: Claude Code has investigated a problem thoroughly, and the next step is a time-consuming execution task you'd rather run as a standalone Codex job without continuing to occupy Claude Code's context window.

Status Management

/codex:status    # show running and recent Codex jobs for the current repo
/codex:result    # show final output of a finished job (includes Codex session ID for resuming)
/codex:cancel    # cancel the currently active background job
Enter fullscreen mode Exit fullscreen mode

Deep Dive

Review Gate: The Stop Hook

Review Gate is the most aggressive feature in this plugin — and the highest-risk one.

How it works:

Claude completes its analysis, prepares to respond
    ↓
Stop Hook fires
    ↓
Review Gate runs a targeted Codex review
    ↓
If Codex finds issues:
    Block the Stop Hook → Claude cannot respond → forced to address the issues first
If no issues found:
    Allow through → Claude outputs its response
Enter fullscreen mode Exit fullscreen mode

Essentially, Review Gate makes Codex a mandatory quality gate that Claude must pass before completing each response. Claude cannot "say it first, fix it later" — it must address whatever Codex finds before the turn ends.

Enabling it:

/codex:setup    # the setup flow asks whether to enable Review Gate
Enter fullscreen mode Exit fullscreen mode

The README warning — quoted directly:

WARNING: This can create long-running loops. It can also drain your usage limits. Use it with caution and monitor the results carefully.

Two real risks:

  1. Infinite loops: Codex flags an issue → Claude modifies the code → Codex reviews the new code → flags another issue → repeat.
  2. Usage burn: Every Claude response triggers an additional Codex run. Costs multiply.

Review Gate makes sense for high-stakes changes (core logic, security-sensitive code). Leaving it on for routine development is expensive. Know what you're accepting before enabling it.

Architecture

User types: /codex:rescue
    │
    ▼
Claude Code plugin layer receives the command
    │
    ├── Read project config (.codex/config.toml)
    │
    ├── Spawn local Codex CLI (@openai/codex)
    │   or connect to Codex app server
    │
    ├── Authenticate with local credentials
    │   (ChatGPT account or OpenAI API key)
    │
    └── Track background jobs per repository
                ↓
        /codex:status → query job state
        /codex:result → retrieve output
        /codex:cancel → stop active job
Enter fullscreen mode Exit fullscreen mode

codex:codex-rescue is registered as a named subagent under /agents. Session import uses Codex's external-agent session importer, which is how /codex:transfer creates a persistent thread from the current session history.

Two Agents, Two Roles

The most coherent mental model for using this plugin is role separation:

Role Agent Strengths
Context manager, strategist Claude Code Investigates, plans, asks questions, synthesizes
Executor, independent verifier Codex Runs tasks in background, reviews without bias toward current context
Common workflow:
Claude Code investigates a bug, identifies root cause
    ↓
/codex:rescue investigate [description] and try a fix --background
    ↓
Claude Code continues on other work
    ↓
/codex:status → check progress
/codex:result → review the fix
Enter fullscreen mode Exit fullscreen mode

The agents work in parallel. Neither has to wait for the other.

Command Reference

Command Use when
/codex:review Quick sanity check on uncommitted changes
/codex:adversarial-review Pressure-testing design decisions; need a counterpoint
/codex:rescue Handing a task to Codex to execute independently
/codex:rescue --background Want execution to run without blocking Claude
/codex:transfer Claude is done investigating; Codex should continue in its own session
Review Gate High-risk code changes where mandatory pre-response review is worth the cost

The Cross-Vendor Signal

The technical implementation here is not complex — the plugin wraps Codex CLI calls in a Claude Code plugin. The engineering lift is modest.

What's notable is the decision to build and maintain this at all. OpenAI published an official plugin for a competitor's dev tool, invested in its maintenance (v1.0.5 with active updates), and designed session transfer to work in both directions. That's not a throwaway integration.

The implication: at the tooling layer, the AI coding ecosystem is becoming vendor-agnostic faster than the model layer. Users increasingly run multiple agents in parallel, each selected for what it's good at. Cross-vendor collaboration is a feature, not an anomaly.

Claude Code's plugin system provides an open interface that any third party — including competitors — can build on. This plugin, alongside community tools like caveman (#150), points toward a multi-agent ecosystem where agent boundaries are functional rather than brand-based.


Resources

Official Links


Summary

codex-plugin-cc's core value is reducing the switching cost of multi-agent workflows. When you're working in Claude Code and need a second agent's perspective or execution capacity, switching tools means re-establishing context, opening new windows, and manually transferring information. This plugin eliminates that friction.

The 7 commands cover three distinct use cases:

  • Review (/codex:review, /codex:adversarial-review): bring in a second perspective without interrupting the current workflow
  • Delegate (/codex:rescue): hand a task off entirely, with background execution
  • Transfer (/codex:transfer): carry full context into Codex for continuation

/codex:adversarial-review has the strongest differentiated value. When you're uncertain about an architectural decision and need something to actively challenge it — not just find bugs, but question whether the direction is right — this command provides that directly. It's a "steelman the opposition" tool built into the review workflow.

Review Gate is powerful for high-stakes code changes but the README warning is genuine. Enable it with clear intent, not as a default.

If you're already running both Claude Code and Codex in your workflow, the plugin is worth installing for a few days. The real learning is discovering where the two-agent boundary should live for your specific work.


Explore PrimeSkills — a curated marketplace of AI agents and skills, each validated against real enterprise workflows. No hype, just what actually works.

Visit my personal site for more insights and interesting products.

Top comments (0)