← All workflows

Claude + Codex Model Router

Websites
You'll need
Claude Code, a ChatGPT account (the free plan works) or an OpenAI API key, Node.js 18.18 or newer
Cost
Uses the plans you already have
Setup
10 minutes

Claude + Codex Model Router

What it does

Runs two AI coding tools in one terminal. Claude Code plans the work, hands out tasks and reviews the results. Codex does the heavy coding. This saves your Claude usage for planning, and a second model can catch mistakes the first one misses.

What you need

  • Claude Code installed and working
  • A ChatGPT account (Free tier works) or OpenAI API key
  • Node.js 18.18 or later
  • Work you hand to Codex counts toward your Codex usage limits

Setup (one time)

  1. Inside Claude Code, run:
/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
/reload-plugins
/codex:setup
  1. /codex:setup checks everything. If the Codex CLI is missing, it offers to install it with npm. If you're not signed in, run this and sign in with your ChatGPT account or API key:
!codex login
  1. Optional: to set Codex's default model for a project, create .codex/config.toml in 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. You can also save it as a Claude Code skill, so one command turns it on:

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 a critical second opinion before merging.

The order: Claude plans, Codex builds, Claude reviews, and you approve.

Maintenance habits

  • A second opinion before you merge: /codex:review --base main --background has Codex look for problems in your branch changes.
  • Start fresh sessions: long sessions get less reliable. Before you clear one, have Claude write a handoff note to a file. It should say where the task stands, what was decided, and what's left. Then start a new session and load the note.
  • Check jobs: /codex:status shows running and recent Codex jobs. /codex:result gets the output of finished ones.