magic-cc-codex-worker
Parallel OpenAI Codex workers inside Claude Code.

Languages: English · 简体中文
Turn Claude Code into a multi-agent coding system powered by OpenAI Codex. A zero-install Claude Code plugin for multi-agent orchestration — delegate implementation, code reviews, and planning to a pool of parallel Codex workers, each running in its own isolated git worktree, via the MCP (Model Context Protocol) standard.
The bridge between Claude Code and the OpenAI Codex ecosystem: Claude stays in orchestrator mode (planning, synthesis, interactive work), Codex workers absorb the grunt work. Get dual-model PR review, resumable sessions across conversations, and role-based agent specialization — while preserving your Claude quota for what Claude does best.
Why use this?
- ⚡ Parallel execution. Fan out N Codex workers on independent subtasks in N isolated worktrees. Finish work that would serialize in a single Claude session.
- 🛡️ Isolated experimentation. Every implementer runs in its own
git worktree on its own branch. Try three approaches in parallel; keep the best; discard the rest. Zero risk to your main tree.
- 🔀 Two model families beat one. Launch a Codex (GPT) reviewer alongside your Claude review — different models catch different classes of bugs. The plugin materializes PRs in detached worktrees so the reviewer reads real files, not a diff blob.
- 💰 Quota arbitrage. Claude budget running low? Dial delegation up to
max and route everything Codex can handle over there — Claude stays in orchestrator mode. One knob (minimal / balance / max) controls the split.
- 🎯 Role-tuned, observable delegation. Not a thin "forward the prompt" wrapper — a full orchestration layer with role-based specialization (implementer / reviewer / planner / generic), resumable sessions, per-role sandbox + timeout, and first-class session tracking in a persisted registry.
- 🧰 Production engineering. 62 unit tests, strict TypeScript, CI on Node 20/22. Designed from an actual spike of Codex's MCP protocol — no stdout parsing, no brittle scraping. Git worktrees for parallelism, MCP protocol for transport, TOML for configuration, sandboxed execution for safety.
How it compares to the official Codex plugin
| Official OpenAI Codex plugin | magic-cc-codex-worker |
|---|
| Single Codex session in Claude Code | ✅ | ✅ |
| Multi-agent orchestration | ❌ | ✅ |
| Parallel worker execution | ❌ | ✅ |
| Git worktree isolation per worker | ❌ | ✅ |
| Role-based specialization | ❌ | ✅ |
| Resumable session continuity | ❌ | ✅ |
| Dual-model PR review | ❌ | ✅ |
| Epic / batch fan-out | ❌ | ✅ |
OpenAI's official Codex plugin lets you use Codex. This plugin lets you scale Codex into a multi-agent coding system inside Claude Code.
Quick start
Install (two slash commands)
Claude Code plugin distribution is a two-step pattern — same as brew tap + brew install or apt-add-repository + apt install. First you register a marketplace (a catalog that lists plugins), then you install one of its plugins. Our marketplace happens to contain only this one plugin, so the names look duplicated — that's normal.
Step 1 — Register the marketplace catalog
Tells Claude Code "this GitHub repo publishes a plugin catalog." It clones the repo's .claude-plugin/marketplace.json and lists the plugins available from it. No plugin is installed yet.
/plugin marketplace add wenqingyu/magic-cc-codex-worker
Step 2 — Install the plugin from that marketplace
Picks one plugin out of the catalog and attaches it to your Claude Code session. The <plugin-name>@<marketplace-name> format disambiguates when a plugin name exists in multiple catalogs.
/plugin install magic-codex@magic-codex
Step 3 — Reload plugins
Activates the newly-installed plugin in the current session without a full restart.
/reload-plugins