Five ways to use Claude Code and Codex together
Most setups combine two or three of these. If you're still choosing between the agents, start with Claude Code vs Codex.
| Way | How it works | Use it when |
|---|---|---|
| 1. Shared instructions | One AGENTS.md that both agents read; CLAUDE.md imports it | Always. It's the cheapest step and stops the two agents following different rules |
| 2. Separate worktrees | Each agent works in its own git worktree and branch of the same repo | Both agents edit code at the same time |
| 3. One writes, the other reviews | Claude Code writes, codex review checks the branch, or the other way round | You want a second model to catch what the first one missed |
| 4. Codex inside Claude Code | OpenAI's codex-plugin-cc adds /codex:review, /codex:rescue and more to Claude Code | You live in Claude Code and want Codex one command away |
| 5. An orchestrator | A board or app (Claude Squad, Conductor, Orca, Vibe Kanban, Crewmark) starts and tracks both | You run several agents every day and lose track of terminals |
2. Run them in separate worktrees
Two agents editing one checkout will overwrite each other; Claude Code's own docs warn that two agents editing the same file leads to overwrites. A git worktree is a second working directory with its own files and branch that shares the repository's history, so each agent gets its own copy to edit.
Claude Code creates one for you with claude --worktree <name> under .claude/worktrees/. The Codex CLI has a --worktree flag that starts a session or a codex exec run in a new managed worktree, and the Codex desktop app manages worktrees for its tasks. Plain git worktree add works for either agent. Our Claude Code worktree guide covers cleanup, .worktreeinclude for .env files and the base branch.
3. Let one write and the other review
This is the pattern most people mean by using the two together. A second agent from another vendor reads the diff without the first agent's assumptions, so it can catch what the author missed.
- Codex reviewing Claude:
codex review --base mainreviews the branch against main;--uncommittedreviews staged, unstaged and untracked changes;--commit <SHA>reviews one commit. - Claude reviewing Codex: pipe the diff into
claude -p, the non-interactive mode. The Claude Code docs show the same idea as a build script that runsgit diff main | claude -pas a reviewer. - Send the findings back to the agent that wrote the code and let it fix them; don't let the reviewer edit the branch too.
4. Call Codex from inside Claude Code (official plugin)
OpenAI publishes codex-plugin-cc, an Apache-2.0 Claude Code plugin to "use Codex from Claude Code to review code or delegate tasks". It uses the codex CLI already on your machine, with the same login, config and checkout. You need a ChatGPT plan (Free counts) or an OpenAI API key, and Node.js 18.18 or later. Usage counts toward your Codex usage limits.
Install it from inside Claude Code with /plugin marketplace add openai/codex-plugin-cc, /plugin install codex@openai-codex, /reload-plugins and /codex:setup.
/codex:review: a read-only Codex review of uncommitted changes, or of the branch with--base main. The README says it matches running/reviewin Codex itself./codex:adversarial-review: a read-only review you can steer, aimed at design choices, tradeoffs and risky areas./codex:rescue: hands Codex a task, such as investigating a bug or trying a fix, through a subagent; add--backgroundfor long jobs and check them with/codex:statusand/codex:result./codex:transfer: turns the current Claude Code conversation into a Codex thread and prints thecodex resumecommand to continue it there.- The optional review gate (
/codex:setup --enable-review-gate) runs a Codex review every time Claude tries to stop and blocks the stop if it finds issues. The README warns it can loop for a long time and drain usage limits quickly, so only turn it on while you're watching.
Step by step: worktrees, shared instructions and a review loop
This is the most common setup: Claude Code and Codex each build in their own worktree from the same AGENTS.md, then review each other's branch before you merge. Every command is from the Claude Code docs, the Codex CLI reference or the plugin README; the review prompt is an example.
Write one AGENTS.md and import it from CLAUDE.md
Put the shared rules in AGENTS.md at the repo root. Codex reads it directly. If you also have a CLAUDE.md, start it with the import so Claude Code reads the same file.
# CLAUDE.md: Claude Code reads AGENTS.md first, then the rest @AGENTS.md ## Claude Code Use plan mode for changes under src/billing/.Start Claude Code in its own worktree
Claude Code creates the worktree and a branch for it. Install dependencies inside the worktree, since it's a fresh checkout.
# Claude Code in its own worktree: .claude/worktrees/feature-auth, branch worktree-feature-auth claude --worktree feature-auth # keep worktrees out of git status echo ".claude/worktrees/" >> .gitignoreStart Codex in a second worktree
Create a worktree with git and point Codex at it with --cd, or let Codex make a managed worktree with --worktree.
# Codex in a second worktree on its own branch git worktree add ../project-feature-a -b feature-a codex --cd ../project-feature-a # or let Codex create a managed worktree for a one-shot task codex exec --worktree "implement the next step"Have Codex review Claude's branch
When Claude Code finishes, run a Codex review against main from Claude's worktree, or from inside Claude Code if you installed the plugin. Paste the findings back to Claude Code to fix.
# Codex reviews Claude's branch (run inside Claude's worktree) codex review --base main # or, from inside Claude Code, with OpenAI's plugin /codex:review --base mainHave Claude Code review Codex's branch
Pipe Codex's diff into Claude Code's non-interactive mode and hand the findings back to Codex.
# Claude Code reviews Codex's branch (run inside Codex's worktree) git diff main | claude -p "Review this diff for bugs and missing tests. List each issue with file:line."Merge, then remove the worktrees
Merge each branch as usual (or open a PR), then remove the worktrees you no longer need. Claude Code offers to clean up its own worktree when you exit the session.
git worktree list git worktree remove ../project-feature-a
Can Claude Code and Codex talk to each other?
Not directly in a chat-like sense. Neither agent has a built-in channel to the other vendor's agent, so they talk through something both can reach: the files and git history in the repo, a command one runs in the other's CLI, or a board that both read.
- Through the CLI: Claude Code can run
codex execorcodex reviewas a shell command, and Codex can runclaude -p. Each gets the other's answer as command output. - Through the plugin: in Claude Code,
/codex:rescueand/codex:reviewsend work to Codex and bring the result back into the conversation. OpenAI maintains the plugin. - Through MCP: this route has mostly closed. Codex used to run as an MCP server with
codex mcp-server; OpenAI removed it in Codex rust-v0.154.0 and points integrators to the experimental Codex app server, which speaks its own JSON-RPC protocol. Going the other way,claude mcp serveturns Claude Code into an MCP server, but it exposes Claude Code's tools (read, edit, shell), not a second Claude agent. - Through a shared board: an orchestrator or an issue board holds the task, the comments and the status, and each agent reads and writes there.
- What doesn't cross vendors: Claude Code's agent teams and its cross-session messaging connect Claude Code sessions only. A Codex session can't be a teammate.
Can you run Claude Code and Codex at the same time?
Yes. They are separate programs with separate logins, so both can run on one machine and one repo at once. Claude Code uses your Claude plan or API key; Codex uses your ChatGPT plan or an OpenAI API key. What you need to manage is files and usage.
- Files: give each agent its own worktree. Two agents in one checkout will edit the same files and overwrite each other.
- Usage: each agent draws on its own limits. Work you send to Codex through the Claude Code plugin counts toward your Codex usage limits.
- Loops: an automatic review loop (like the plugin's review gate) can keep both agents busy for a long time and drain limits quickly. Run it while you're watching.
- Claude-side parallelism costs more: Anthropic says agent teams use significantly more tokens than a single session, and the cost grows with each teammate.
Tools that orchestrate Claude Code and Codex
If you start several agents a day, a tool that creates the worktrees, opens the terminals and shows the diffs saves a lot of switching. These all run Claude Code and Codex; see Vibe Kanban alternatives for a wider comparison.
| Tool | What it does | Isolation | Runs on | Licence / status |
|---|---|---|---|---|
| Claude Squad | Terminal app to manage Claude Code, Codex, OpenCode, Amp and other agents; run Codex with cs -p "codex" | tmux session and git worktree per agent | Terminal (installs with Homebrew) | Open source, AGPL-3.0 |
| Conductor | Runs Claude Code, Codex, Cursor and OpenCode in parallel; review the diff, open a PR, merge | A workspace and branch per task | Mac | Desktop app |
| Orca | Runs a fleet of terminal agents, Claude Code and Codex included, with your own subscriptions | Git worktree per agent | macOS, Windows, Linux | Open source, MIT |
| Vibe Kanban | Kanban board that starts a workspace per issue with Claude Code, Codex, Gemini CLI and others | Git worktree per workspace | Browser or desktop app via npx vibe-kanban | Open source, Apache-2.0; community maintained since bloop shut down in April 2026 |
| Crewmark | Claude Code and Codex as long-running AI employees with roles on a shared issue board | Each employee is its own session on your machine | Your own machine | See below |
Crewmark: Claude Code and Codex as a team on one board
The tools above are built around one task at a time: start an agent, review the diff, merge. If you want Claude Code and Codex to keep working together over days, with each owning a role, Crewmark is another option.
In Crewmark each agent is an AI employee: a long-running session with a role, running on your own machine. Claude Code and Codex employees run natively; other agents, such as OpenCode, DeepSeek Harness and Gemini, connect through ACP (acpx). Work moves through a shared issue board, where you and the employees assign issues, comment, @mention each other and change statuses. That's how a Claude Code employee hands a review to a Codex employee: it @mentions it on the issue. Employees wake on a schedule (heartbeats) and whenever they're mentioned, so the review starts without you passing it along.
It doesn't replace worktrees or the review commands above; your employees still use them. It adds the roles, the board and the wake-ups around them. For the idea behind it, see multi-agent harness.
FAQ
Can Claude Code and Codex work together?
Yes. The common setup is one shared AGENTS.md, a separate git worktree for each agent, and a review loop where one writes and the other runs a review. OpenAI also publishes an official Claude Code plugin, codex-plugin-cc, that lets Claude Code call Codex.
What's the best way to use Claude Code and Codex together?
Let one write and the other review. Build with Claude Code in its own worktree, then run codex review --base main (or /codex:review from inside Claude Code) and send the findings back. Swap roles when Codex writes.
Can Claude Code and Codex talk to each other?
Indirectly. Each can run the other's CLI (codex exec, codex review, claude -p) and read the output, the Codex plugin passes tasks and results inside Claude Code, and a shared board can hold the conversation. Claude Code's agent teams and cross-session messaging connect Claude Code sessions only.
Can I run Claude Code and Codex at the same time?
Yes, on the same machine and repo. Give each its own worktree so they don't overwrite each other's files. Each uses its own plan or API key, and work you send to Codex through the plugin counts toward your Codex limits.
Can I use Codex as an MCP server in Claude Code?
Not anymore. codex mcp-server was removed in Codex rust-v0.154.0; OpenAI now points to the Codex app server, which isn't MCP. To use Codex from Claude Code, install OpenAI's codex-plugin-cc instead.
Do Claude Code and Codex share AGENTS.md?
They can. Codex reads AGENTS.md by default. Claude Code reads it when the repo has no CLAUDE.md (v2.1.277 and later); if you have a CLAUDE.md, start it with @AGENTS.md so both agents follow the same file.
Can Codex be a teammate in Claude Code agent teams?
No. Agent teams are made of Claude Code instances: a lead and teammates that share a task list and mailbox. To bring Codex into the same work, use the Codex plugin, a review loop, or a board that runs both.
Which tools run Claude Code and Codex side by side?
Claude Squad, Conductor, Orca and Vibe Kanban start both agents in isolated worktrees or workspaces. Crewmark runs them as long-running AI employees on a shared issue board.
Commands and features checked against the Claude Code docs, the Codex docs and CLI reference, and the codex-plugin-cc README on November 20, 2026.