Claude + Codex Model Router
What it does
Runs two AI coding agents in one terminal: Claude Code plans, reviews, and orchestrates; Codex executes heavy implementation. You spend your premium Claude tokens on thinking, not typing — and get a second model catching the first one's blind spots.
What you need
- Claude Code installed and working
- A ChatGPT account (Free tier works) or OpenAI API key
- Node.js 18.18 or later
- Note: delegated work counts against your Codex usage limits
Setup (one time)
- Inside Claude Code, run:
/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
/reload-plugins
/codex:setup
/codex:setupchecks everything. If Codex CLI is missing it offers to install it via npm. If not signed in, run!codex login(ChatGPT account or API key).- Optional — pick Codex's default model per project by creating
.codex/config.tomlin the repo root:
model = "gpt-5.4-mini"
model_reasoning_effort = "high"
The workflow (daily use)
Paste this once at the start of a session (or save it as a Claude Code skill so one command activates it):
You are the orchestrator. Division of labor:
YOU (Claude): planning, repo understanding, architecture decisions,
task decomposition, and final review of all delegated work.
CODEX (via /codex:rescue): heavy implementation, debugging, test
fixing, refactoring, multi-file edits.
Rules:
- Keep each Codex task focused and specific — one job per delegation.
- Run long Codex tasks with --background and keep working.
- When Codex finishes, inspect the result yourself before accepting.
Do not blindly trust its output.
- For risky changes, run /codex:review as an adversarial second
opinion before merging.
The rhythm: Claude plans → Codex builds → Claude reviews → you approve.
Maintenance habits
- Adversarial review before merges:
/codex:review --base main --backgroundgives a skeptical second-model pass on branch changes. - Context hygiene: long sessions degrade. Before clearing a bloated session, have Claude write a handoff note (task state, decisions made, what's left) to a file, then start fresh and load it.
- Check jobs:
/codex:statusshows running/recent Codex jobs,/codex:resultfetches finished output.