Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
Claude writes. Codex reviews. You ship. Cross-model pair programming inside Claude Code 🧡🖤
From the repo.
Claude writes. Codex reviews. You ship.
OpenAI open-sourced a Codex plugin for Claude Code, so the two best coding agents finally live in one terminal. ClauDex makes them collaborate instead of just coexist:
/claudex <task> runs a write→review loop: Claude implements, Codex reviews the diff (read-only, via codex exec --sandbox read-only), Claude fixes what's real, repeat to consensus — max 3 rounds./claudex:verdict has both models review the same diff independently and surfaces where they disagree: 🤝 both flagged, 🧡 only Claude, 🖤 only Codex — ending in SHIP / FIX FIRST / REDESIGN.One command to build with a built-in rival reviewer; one command to get a second opinion on code that's already written. Nothing ships until both models agree.
ClauDex needs two AI tools installed. If you already have both, skip to Install ClauDex.
Step 1 — Claude Code (the terminal where everything happens). Needs Node.js 18+:
npm install -g @anthropic-ai/claude-code
claude # opens Claude Code; sign in with your Claude account
Step 2 — Codex CLI (the reviewer). Needs a ChatGPT subscription or an OpenAI API key:
npm install -g @openai/codex
codex login # sign in with your ChatGPT account
Step 3 — a git repo. ClauDex reviews changes, so run it inside any project that uses git (git init if yours doesn't yet).
In an interactive Claude Code session — the claude command in your terminal, or the desktop app's chat — type:
/plugin marketplace add hamza-ali-shahjahan/claudex
/plugin install claudex@claudex
/claudex:setup
Prefer the shell? Same result without opening a session:
claude plugin marketplace add hamza-ali-shahjahan/claudex
claude plugin install claudex@claudex
Either way the install is per-user and one-time: /claudex is then available in every Claude Code session on your machine (already-open sessions need a restart — plugins load at session start).
/claudex:setup checks everything above and tells you exactly what to fix if something's missing.
When setup says "ClauDex is ready", run:
/claudex:demo
It plants five bugs in a throwaway repo — an obvious crash, a subtle money-math issue, a pure judgment call — then has Claude and Codex review the file independently and shows you the scoreboard: which bugs 🤝 both caught, which only 🧡 Claude saw, which only 🖤 Codex saw. Your own files are never touched, and the throwaway repo is deleted afterwards.
When you're ready for real code, run /claudex:verdict in any repo with uncommitted changes.
| Command | What it does |
|---|---|
/claudex <task> | The loop: Claude implements, Codex reviews the diff, Claude fixes, repeat until both agree (max 3 rounds). Ends every run with built with love by ClauDex 🧡🖤. |
/claudex (no args) | Runs the review loop on your current uncommitted changes. |
/claudex:verdict [focus] | Two independent reviews of the same diff, merged into a verdict table: 🤝 both flagged, 🧡 only Claude, 🖤 only Codex. Ends with SHIP / FIX FIRST / REDESIGN. |
/claudex:debate <decision> | Both models argue a design decision from opposite corners — independent openings, one rebuttal round each, then a decision brief ending in CONSENSUS or SPLIT DECISION. You arbitrate. |
/claudex:setup | Checks Codex CLI, auth, and git are ready — with the exact fix command for anything missing. |
/claudex:demo | The two-minute first duet: plants five bugs in a throwaway repo, both models review independently, you get the planted-vs-caught scoreboard. |
/claudex:stats | The duet's history in this repo: agreement rate, rounds-to-consensus, rulings, interruptions — tallied from a local ledger no one commits. Reads only; never signs. |
/claudex:gate on|off|status | The consensus gate, per-repo and opt-in: once ON, commits made through Claude Code block unless a signed cross-review is newer than the last commit. Ships dormant everywhere. |
Every command checks for both halves before doing any work, and every run ends one of exactly two ways.
When both are here, the duet plays out — Claude writes, Codex reviews, they iterate to consensus — and the run signs off with:
built with love by ClauDex 🧡🖤
That line is earned, not decorative. It only appears after Codex has actually reviewed the diff, so seeing it means the code was cross-reviewed — the same guarantee behind the commit co-author trailers and the badge. The verb matches the work: the /claudex loop signs built with love; /claudex:verdict signs reviewed with love, because it builds nothing; /claudex:debate signs argued with love, because arguing is all it does.
When Codex is missing or not logged in, ClauDex refuses to run rather than quietly doing a one-model job:
It takes two to ClauDex. 🧡 Claude is here — 🖤 Codex is not, so this would be built with love by Claude alone, and that's not the deal. Fix it in two lines, then come back for the duet:
npm i -g @openai/codex codex login
And the contract is enforced end-to-end: if the Codex call fails mid-run, if there's nothing to review, or if the models are still deadlocked after three rounds, the run ends unsigned and says so. No silent fallbacks. If it signed, it was cross-reviewed — that is the only way the line appears.
ClauDex never runs by default. No background reviews, no silent gates in your workflow — a duet costs real minutes and real Codex quota, so the only trigger is a human typing a command (or asking their agent to run one). If you didn't invoke it, it didn't run. The GitHub Action is the same consent written down: it runs only in repos where you committed a workflow that names it, with API keys you configured. And the consensus gate is the same consent applied to enforcement: the hook ships with the plugin but is dormant in every repo until you run /claudex:gate on there — anywhere else it does nothing but exit.
The one soft touch is the bundled claudex-second-opinion skill: after a substantial or risky change — auth, payments, concurrency, a big refactor, a bug fix with an uncertain root cause — Claude may suggest running /claudex:verdict, in a single line, at most once. It cannot invoke Codex on its own. Commands do the work; the skill just remembers to ask. (Don't even want the suggestion? claude plugin disable claudex@claudex when you're not using it, or delete the skill directory from your installed copy.)
Every model has blind spots — but they're different blind spots. When two frontier models trained by rival labs independently flag the same line, that's the strongest review signal you can get for free. When they disagree, that's exactly where a human should look. ClauDex turns the rivalry into a QA process.
Do I pay for two subscriptions? ClauDex uses what you already have: Claude Code runs on your Claude plan, Codex on your ChatGPT plan (or an OpenAI API key). ClauDex itself is free and open source.
Does my code get sent to both companies? Yes — that's the point. Claude reads your diff, and Codex reads it too (read-only, via your local codex CLI). If your project forbids sending code to either vendor, don't run ClauDex on it.
"command not found: codex"? Install Node 18+, then npm i -g @openai/codex. If it still fails, your npm global bin isn't on PATH — npm bin -g shows where it lives.
Codex installed but every run is refused? You're probably not logged in: run codex login. /claudex:setup diagnoses this for you.
I typed /claudex and nothing happened? Either the plugin isn't installed for your user (fix from any shell: claude plugin marketplace add hamza-ali-shahjahan/claudex && claude plugin install claudex@claudex), or the session was opened before you installed it — restart the session; plugins load at session start. And in environments where slash commands aren't available at all (SDK sessions, some integrations), just ask Claude to "run the ClauDex verdict on this diff" — the commands are protocols, and Claude can execute them directly.
"The duet was interrupted"? The Codex call failed or timed out — usually rate limits, especially right after a previous heavy review. This is ClauDex working as designed: an interrupted review ends unsigned instead of pretending. Wait a bit and re-run; limits typically clear within the hour.
Can Codex change my files? No. ClauDex invokes Codex in read-only sandbox mode (codex exec --sandbox read-only). Claude makes the edits; Codex only reviews.
Will the consensus gate block my own terminal commits? No — it only intercepts commits made through Claude Code, and only in repos where you ran /claudex:gate on. Everywhere else the hook is a no-op. If a gated repo starts blocking you and you don't want that, /claudex:gate off lifts it instantly.
Shipped something through the loop? Wear it:
[](https://github.com/hamza-ali-shahjahan/claudex)
Commits made through /claudex carry both co-authors:
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Codex <noreply@openai.com>
The verdict, in CI: both models review every PR independently, and the merged verdict lands as a comment. Add this workflow to your repo (e.g. .github/workflows/claudex.yml), and set ANTHROPIC_API_KEY and OPENAI_API_KEY in the repo's Actions secrets:
name: ClauDex verdict
on:
pull_request:
permissions:
contents: read
pull-requests: write
jobs:
verdict:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # ClauDex diffs against the base branch
- uses: hamza-ali-shahjahan/claudex@v0.7.0
with:
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
Three things to know before you turn it on:
if: contains(github.event.pull_request.labels.*.name, 'claudex') to the job and apply the claudex label when you want the duet.reviewed with love by ClauDex 🧡🖤 only when both models actually reviewed. If either key is missing, either review fails (after one retry), or the merge fails, the check fails and no comment is posted — never a silent one-model verdict.focus input narrows the review (e.g. focus: security), same as /claudex:verdict.Every /claudex, /claudex:verdict, and /claudex:debate run appends one JSON line to a ledger at <git-dir>/claudex/stats.jsonl — inside the .git directory, so it can never be committed and never touches your tree. /claudex:stats tallies it: agreement rate between the models, rounds-to-consensus, SHIP/FIX FIRST/REDESIGN rulings, debate outcomes, interruption rate. The stats stay on your machine; nothing is phoned anywhere.
For repos where cross-review shouldn't be optional. Run /claudex:gate on in a repo, and from then on any git commit made through Claude Code there is blocked unless the ledger shows a signed cross-review newer than the last commit — the sign-off contract, enforced. /claudex:gate off lifts it; /claudex:gate status tells you whether a commit would pass right now.
Honest scope and promises:
.git, so it can never be committed and never follows a clone.All four original roadmap items — /claudex:debate, the GitHub Action, agreement stats, and the opt-in consensus gate — have shipped. Got an idea for what the duet should do next? Open an issue.
ClauDex is an independent community project. It is not affiliated with, endorsed by, or sponsored by Anthropic or OpenAI. "Claude" is a trademark of Anthropic, and "Codex"/"ChatGPT" are trademarks of OpenAI.
ClauDex is part of Hamzaish — an open agentic startup-factory OS for Claude Code. Built there, and kept tidy in CI by the factory's own @hamzaish/rotscan.
Part of hamzaish — the open-source Claude Code factory · kept tidy in CI by @hamzaish/rotscan · MIT licensed · built with love by ClauDex 🧡🖤
Replace {MCP_ENDPOINT_URL} with this MCP’s endpoint URL (from its repo or docs above). No API key — you connect directly.
Tool
OS
Config file: ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server": {
"url": "{MCP_ENDPOINT_URL}"
}
}
}Paste into mcpServers in the config file. Restart Cursor after saving.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.