Claudex
A Claude Code plugin for multi-AI deliberation between Claude and Codex.
Claude reasons inline, a persistent Codex partner runs in the background,
and you watch both sides of the debate stream live in your terminal —
like overhearing a technical argument between two senior engineers.
Install
/plugin install bhaskar-melkani/claude-codex
Registers automatically:
/deliberate and /deliberate-template skills
/council skill for parallel multi-track analysis
- Codex MCP server wiring
- Auto-deliberation hook on
/plan
Prerequisites
Usage
Direct deliberation
/deliberate "Should we use Prisma or Drizzle for the new service?"
From a template (guided topic builder)
/deliberate-template
Picks from 12 common decision types (REST vs GraphQL, SQL vs NoSQL,
Monolith vs Microservices, etc.) and asks 2-3 questions to build a
focused topic before launching.
Multi-track council (parallel analysis)
/council "Should we migrate to microservices?"
Decomposes the decision into 2-4 orthogonal tracks (cost, deployment,
team structure, performance) and runs each as a simultaneous Claude+Codex
deliberation. Results are synthesized into a unified recommendation.
Automatic on /plan
/plan should we switch from Postgres to CockroachDB?
The hook detects /plan and injects the full deliberation workflow automatically.
Automatic on plan mode (shift+tab)
Press shift+tab in Claude Code to enter plan mode. The hook fires immediately
and injects a fast 2-round deliberation before Claude produces the plan — no
extra command needed. Claude deliberates with Codex, then leads with the plan.
The deliberation summary is shown in 2–3 bullets; the full transcript is hidden
unless you ask.
What the terminal looks like
================================================================
DELIBERATION STARTING
================================================================
Topic : Should we use Prisma or Drizzle for the new service?
Claude : Opus 4.6 (inline)
Codex : GPT-5.4-mini (background partner)
Max rounds: 3 (min 2)
Log : ~/.claude/deliberations/2026-04-03-prisma-vs-drizzle-a4f1.md
================================================================
● Codex deliberation partner
L Running in the background
================================================================
ROUND 1 / 5
================================================================
┌─ Claude ──────────────────────────────────────────────────
│ **Thesis:** Prisma is the right choice for this team because
│ its type-safe client eliminates an entire class of runtime errors.
│
│ ### Position
│ At ~50k writes/day with a TypeScript-first team and no prior ORM
│ experience, Prisma's generated client is a significant productivity
│ win...
└───────────────────────────────────────────────────────────
┌─ Codex ──────────────────────────────────────────────────
│ (thinking...)
...
│ **Thesis:** Drizzle's zero-overhead SQL approach is safer at scale.
│
│ ### Position
│ Prisma's query engine adds ~20ms cold-start latency in serverless
│ environments and its migration system has known pain points...
└───────────────────────────────────────────────────────────
Round 1 complete.
Still disputed: migration DX, serverless cold-start overhead
----------------------------------------------------------------
Architecture
Main session (Claude, inline) Codex partner (background agent)
───────────────────────────────── ──────────────────────────────────
Phase 1: setup, spawn partner ──► partner starts, awaits Round 1
Round 1:
Claude position (streams live)
SendMessage("codex-partner") ──► calls mcp__codex__codex (GPT-5.4-mini)
stores threadId internally
◄── response ──
Print Codex response (live)
Round 2–5:
Claude responds to Codex
SendMessage("codex-partner") ──► calls mcp__codex__codex-reply
◄── response ── (reuses threadId from Round 1)
Print Codex response (live)
Phase 3: tie-breaking, final plan
SendMessage("DELIBERATION COMPLETE") ► partner exits
Key properties:
- One persistent agent for the whole deliberation (not a new agent per round)
- threadId lives inside the partner — no JSON extraction or passing between agents
- Both sides print live — you see the conversation as it happens
- Native Claude Code tree UI — partner shows as
● Running in the background
Skills
/deliberate
Core deliberation skill. Runs 2–5 structured rounds between Claude (Opus 4.6,
inline) and Codex (GPT-5.4-mini, background partner).