Call Claude Code from Codex for bounded, independent code review and second opinions
Project description
cc-plugin-codex
Ask Claude Code for an independent code review or second opinion, straight from Codex.
cc-plugin-codex is review-only: Claude reviews, critiques, and advises. It does not edit
your code, run shell commands, or get write tools. It is the mirror image of
openai/codex-plugin-cc, which lets Claude call
Codex.
What it does
- Lets Codex call the Claude Code CLI through MCP.
- Sends Claude bounded context for reviews, critiques, and second opinions.
- Returns structured findings Codex can summarize or act on.
- Keeps Codex as the actor and Claude as a read-only reviewer.
Quickstart
You need:
- Codex
- the
claudeCLI, installed and authenticated - Python 3.11 or newer
uvxgit
Check the basics:
claude --version
claude /login
uvx --version
git --version
Add this repository as a Codex marketplace, then install the plugin from it:
codex plugin marketplace add briandconnelly/cc-plugin-codex
codex plugin add cc-plugin-codex
Restart Codex after installing. Then ask Codex:
Ask Claude to run
claude_status.
claude_status is free. It checks whether the claude CLI is installed, authenticated, and
compatible, and shows the defaults a paid call would use.
Use it
Once claude_status reports ready: true, ask Codex in plain language:
Ask Claude to review my current diff. Pass
workspace_rootas this repository.
Passing workspace_root matters. It keeps reviews pointed at your project instead of the
plugin install directory when the MCP client does not provide a repo root.
Other useful prompts:
- "Ask Claude to review my staged changes for security issues."
- "Have Claude attack this plan for weaknesses."
- "Get an independent second opinion from Claude on this design."
- "Start a background Claude review of this branch against main."
Use this when you want a second model to look for bugs, regressions, missing tests, security issues, or weak assumptions before you merge or commit to a design.
Codex uses the plugin skill to choose the right tool and arguments. Direct MCP calls are also available:
| Tool | Use | Cost |
|---|---|---|
claude_review_changes |
Review a git diff now | paid |
claude_review_changes_async |
Start a background diff review | paid |
claude_adversarial_review |
Pressure-test a plan, claim, or change | paid |
claude_ask |
Ask for a free-form second opinion | paid |
claude_status |
Check readiness and defaults | free |
claude_review_dry_run |
Preview diff/context before a review | free |
Diff review scopes are working_tree, staged, and branch.
Review staged changes with a test-coverage focus:
claude_review_changes({
"workspace_root": "/absolute/path/to/your/repo",
"scope": "staged",
"focus": "tests"
})
For a long review, launch it in the background:
claude_review_changes_async({
"workspace_root": "/absolute/path/to/your/repo",
"scope": "branch",
"base": "main"
})
Poll with claude_job_status, then fetch the result with claude_job_result.
Safety and cost
- Paid tools run Claude and send code or prompts to Anthropic, billed through your existing
claudelogin orANTHROPIC_API_KEY. - Free tools only inspect local state, preflight a request, or manage background jobs.
- Claude never receives write or Bash tools from this plugin. Claude Code hooks are not
tools and may run in
config_mode=inherit/scoped; useconfig_mode=barefor untrusted workspaces. access=toollessis the default: Claude receives gathered context as text and cannot read more files.access=readonlylets Claude useRead,Grep, andGlobfor extra context.- Secret redaction is best-effort defense in depth. Use
access=toollesswhen a workspace may contain secrets. max_budget_usdis a best-effort Claude CLI stop threshold, not a hard cap. Results report actual spend inmeta.cost_usdwhen available.- Reviews default to
effort=xhighfor depth. Lowerefforttohighormediumfor routine reviews when cost matters.
If a requested diff scope has no changes, the review tools return a passing result without invoking Claude.
Mental model
Codex remains responsible for deciding what to do with Claude's feedback. Claude receives only
the context the plugin provides, or read-only file access when you explicitly allow
access=readonly. The plugin does not give Claude write tools, Bash tools, or permission to
modify your workspace. In inherit and scoped, Claude Code may still load workspace hooks
from .claude/settings*.json; those hooks execute outside the tool allowlist.
Common knobs
Every setting is optional. These are the knobs most users are likely to change:
| Variable | Default | Purpose |
|---|---|---|
CC_PLUGIN_CODEX_ACCESS |
toolless |
toolless or readonly |
CC_PLUGIN_CODEX_CLAUDE_CONFIG |
inherit |
inherit, scoped, or bare |
CC_PLUGIN_CODEX_EFFORT |
xhigh |
low, medium, high, xhigh, or max |
CC_PLUGIN_CODEX_MAX_BUDGET_USD |
1.00 |
best-effort per-call budget threshold |
CC_PLUGIN_CODEX_MODEL |
unset | Claude model; unset uses the CLI default |
CC_PLUGIN_CODEX_TIMEOUT_SECONDS |
180 |
per-call timeout, clamped to 10-600 seconds |
ANTHROPIC_API_KEY |
unset | required only for config_mode=bare |
Set these in the environment you launch Codex from. The bundled MCP config forwards the common cost, safety, model, timeout, and API-key variables to the server.
config_mode=inherit uses your normal Claude environment without persisting a session.
scoped drops user-global settings and user MCP servers but keeps CLAUDE.md and workspace
hooks. bare strips CLAUDE.md, memory, and hooks, and requires ANTHROPIC_API_KEY.
Troubleshooting
Start with:
Ask Claude to run
claude_status.
Then:
- If
claude_authenticatedis false, runclaude /login. - If the workspace looks wrong, pass
workspace_rootexplicitly. - If a review is large or expensive, run
claude_review_dry_runfirst. - If a background job id is lost, use
claude_job_list. - If
config_mode=barefails, confirmANTHROPIC_API_KEYis set in the environment that launches Codex.
Distribution
The Codex plugin install path is the primary user-facing path. The bundled MCP config pins the server to a versioned Git tag so installed users update deliberately.
The Python package publishes the MCP server entry point for direct use and release provenance. After a PyPI release, the server can also be launched with:
uvx --from cc-plugin-codex==0.2.0 cc-plugin-codex-mcp
Advanced reference
Every tool returns a structured ok/error envelope. Paid results include usage metadata and
cost when the Claude CLI reports it. The tool contract is experimental and pre-1.0; clients can
pin meta.fingerprint to detect agent-visible changes.
The Claude CLI compatibility assumptions are centralized in
src/cc_plugin_codex/cli_contract.py and documented
in COMPATIBILITY.md.
Local development
Run the MCP server from a checkout:
codex mcp add cc-plugin-codex -- uv run --directory "$(pwd)" cc-plugin-codex-mcp
Run tests:
uv run pytest
The full suite enforces a 95% coverage floor. For one-file iteration:
uv run pytest tests/test_jobs.py --no-cov
Live Claude integration tests are excluded by default:
uv run pytest -m integration --no-cov
They require the claude CLI and make a small paid API call.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cc_plugin_codex-0.2.0.tar.gz.
File metadata
- Download URL: cc_plugin_codex-0.2.0.tar.gz
- Upload date:
- Size: 166.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e95085049e0ed31d4a3852f66484ddb46b929f6eddae263ccbbee514dcc7000
|
|
| MD5 |
f44ec2cbb6d42531d9f00dd69b20e957
|
|
| BLAKE2b-256 |
333ab539ec995578d41a5d8c43810c4d5fa0007edb10aae2b6ffe467c2ab041c
|
Provenance
The following attestation bundles were made for cc_plugin_codex-0.2.0.tar.gz:
Publisher:
publish.yml on briandconnelly/cc-plugin-codex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cc_plugin_codex-0.2.0.tar.gz -
Subject digest:
5e95085049e0ed31d4a3852f66484ddb46b929f6eddae263ccbbee514dcc7000 - Sigstore transparency entry: 1740623604
- Sigstore integration time:
-
Permalink:
briandconnelly/cc-plugin-codex@61675fce7cd43180c7019dc0e5d847cdebc4a43f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/briandconnelly
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@61675fce7cd43180c7019dc0e5d847cdebc4a43f -
Trigger Event:
push
-
Statement type:
File details
Details for the file cc_plugin_codex-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cc_plugin_codex-0.2.0-py3-none-any.whl
- Upload date:
- Size: 46.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6e8295e04acb721c61cfcf934542453706fb8d39312658209547ca697b273c4
|
|
| MD5 |
b707c09042eff1d6b8d0c0d4e683cbfe
|
|
| BLAKE2b-256 |
41fcbbad2e0133d1c3855c8408aff217993d5dc697fd51400a1718a24f57aecf
|
Provenance
The following attestation bundles were made for cc_plugin_codex-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on briandconnelly/cc-plugin-codex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cc_plugin_codex-0.2.0-py3-none-any.whl -
Subject digest:
b6e8295e04acb721c61cfcf934542453706fb8d39312658209547ca697b273c4 - Sigstore transparency entry: 1740623610
- Sigstore integration time:
-
Permalink:
briandconnelly/cc-plugin-codex@61675fce7cd43180c7019dc0e5d847cdebc4a43f -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/briandconnelly
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@61675fce7cd43180c7019dc0e5d847cdebc4a43f -
Trigger Event:
push
-
Statement type: