Orchestrate Claude Code and Codex in One Execution Workflow
Orchestrate Claude Code on its own or alongside Codex CLI: shared goals, task context, branch evidence, reviews, and operator approvals in Mrrlin.
Chat tools vs Mrrlin
The execution layer beats another blank chat window.
Chat tools make you re-send context and manage the work. Mrrlin keeps project memory and spends tokens deliberately.
Your agents, under one harness
One coding agent gives you output. Mrrlin gives you a harness.
Codex, Claude Code, and other agents can write. Mrrlin keeps the brief, routes each task, challenges weak work, and brings you in only for decisions that need you.
Read the workflow transcript
Without a harness, a person carries context between prompts, checks each output, follows up, and decides what happens next. With Mrrlin, one goal becomes a visible plan: work is routed, reviewed, retried when weak, and brought back only for the decisions that need a human.
Before you compare
Coordinating terminal agents without manual context juggling
Running Claude Code and OpenAI Codex CLI in separate terminal sessions quickly leads to context drift, unstaged file collisions, and lost test evidence. Mrrlin acts as the orchestration, worktree boundary, and review layer around both CLIs.
CLI Isolation via Git Worktrees
Each agent process operates in its own dedicated filesystem directory (`git worktree add -b feat/task .worktrees/task-1 main`) without locking files, touching your dirty working tree, or fighting over git index locks.
Structured Handoffs over Copypasta
Instead of manually copy-pasting code snippets or error logs between agent chats, Mrrlin stores task specs and test outputs in durable state accessible by both CLIs.
Automated Zero-Mock Review Gates
Every code modification is verified with real build and test commands before human sign-off, preventing speculative or broken diffs from hitting your main branch.
Why it matters
Claude Code and Codex are both strong. The glue between them is you.
Mrrlin orchestrates Claude Code CLI and OpenAI Codex CLI in parallel git worktree branches with zero-mock evidence gates, automated test verification, and cross-model reviews.
Workflow
One task, two agents, and a review loop neither of them skips.
Write the spec once
The Director drafts a spec for the task, and reviewers covering architecture, security and scope, running on separate models, iterate until they agree. Claude Code and Codex then read that same spec over MCP instead of two diverging paste-ins.
Assign the implementer
Pick per task, or let routing decide: Codex for a contained code change, Claude Code for work that needs a wide read of the repository, or both on alternate implementations. Either way, the run gets its own worktree, branch and recorded base commit.
Cross the review
Whatever Codex writes goes to a reviewer built on another model family, and the same holds for Claude Code's output. Weak work returns to its author with notes, so when you orchestrate Claude Code and Codex this way, the second agent is a genuine second read.
Close on a receipt
Launch QA happens against a real preview: what closes the task is a preview address that loads, a build that passes, or your approval. Production deploys go through your GitHub Actions workflows and wait in the inbox until you say yes.
Evaluation checklist
What to check before you commit.
Worktree isolation per agent
Run Claude Code and Codex CLI in separate git worktrees (`git worktree add -b feat/task .worktrees/task-1 main`) so neither agent overwrites unstaged files or collides on the working directory.
Spec-driven execution prompts
Pass acceptance criteria from Mrrlin via task spec files or environment variables (`claude -p "..."` or `codex exec -C .worktrees/...`) so both agents execute against identical boundary conditions.
Cross-model diff verification
Never allow an agent to approve its own code. Have Codex CLI review Claude Code's worktree diff (`git diff main..HEAD`), and gate merges behind real test receipts and human approval.
Use cases
Where it fits.
Claude Code sessions on their own
Mrrlin works as a Claude Code orchestrator even when no other agent is involved. Each session starts from a task with acceptance criteria, questions land in the inbox rather than stalling the run, and what changed and what remains blocked is recorded, so tomorrow's session picks up where today's ended.
Cross-agent implementation
Codex adds a new endpoint for exporting invoices while Claude Code builds the settings screen that calls it. The UI task waits on the API task through a blocked-by link, both agents read one spec, and the reviewer judges both diffs against the same acceptance checks.
Second-opinion reviews
For a tricky date-parsing function, ask Codex and Claude Code for competing implementations in separate worktrees. A reviewer from a third provider reads both against the spec's edge cases, and you merge the one that handles time zones correctly.
Spec-to-code handoffs
Once the spec converges, its acceptance checks travel with the implementation task. Whichever agent writes the code is judged against those checks, not against its own summary, and the pull request opens with the spec, the diff and the review notes attached.
Comparison
Being the go-between, or giving both agents one task to read.
Keep reading
More on coordinating coding agents.
Start from the AI coding agent orchestration overview, or go deeper with the guides next to this one.
FAQ
Before you start.
Can we use Mrrlin for Claude Code orchestration without Codex?
Yes. Everything in the loop works with Claude Code on its own: tasks with acceptance criteria, specs reviewed before work starts, isolated worktrees, recorded artifacts, inbox questions and memory written back. Adding Codex later mainly brings a second implementer and another vendor's perspective; it is not a prerequisite for orchestrating Claude Code sessions.
Why orchestrate Claude Code and Codex together instead of choosing one?
Because they come from different providers. When one implements and the other reviews, the review is independent in a way a self-review cannot be. You can also route by kind of work and spread the load across two subscriptions you are already paying for, while Mrrlin keeps both on one task, one spec and one evidence trail.
How do you run Claude Code and Codex CLI concurrently in git worktrees?
You create dedicated git worktrees for each task (e.g. `git worktree add -b feat/task-api .worktrees/task-api` and `git worktree add -b feat/task-ui .worktrees/task-ui`), assign the API implementation to Codex CLI (`codex exec -C .worktrees/task-api < spec.txt`), and simultaneously launch Claude Code in the other worktree (`(cd .worktrees/task-ui && claude -p "$(cat ../../spec.txt)")`). Mrrlin records base commits, captures terminal logs, collects passing test artifacts, and coordinates the cross-agent review gate before opening a single pull request.
What are the main gotchas when running CLI coding agents concurrently, and how are they mitigated?
The three most critical issues are: 1) Dev server port collisions during test runs (mitigated by setting PORT=3001 or using per-worktree .env.worktree overrides); 2) Package manager lockfile and cache contention during simultaneous npm/cargo installs (mitigated by using pnpm --store-dir or dedicated temp cache directories); 3) Worktree clutter after branch merges (mitigated by automated git worktree remove and local branch cleanup upon PR merge). Mrrlin handles these worktree lifecycle boundaries automatically.
Does Mrrlin need our Anthropic or OpenAI API keys?
No. Both agents work off the Claude Code and Codex plans you already hold, launched locally by Mrrlin's bridge, so there are no metered API bills. Mrrlin never holds a model credential and never resells tokens. Your plans' own usage limits still apply, which is one reason Autopilot lets you set a daily job budget.
Orchestrate Claude Code & Codex CLI without terminal lockups.
Stop juggling disconnected CLI windows and resolving manual merge collisions. Mrrlin coordinates your agents in isolated git worktrees, collects passing test artifacts, and opens verified pull requests.
No credit card · No migration · One goal