How do I use Claude Code and Codex together
On this page
  1. Why use two coding agents at all?
  2. What are the four ways to combine them?
  3. How do I run a plan, build and review loop?
  4. How do I call Codex from inside Claude Code?
  5. How do I run both side by side in one repository?
  6. What changes when the agents belong to different people?
  7. Where does Joxo fit?
  8. When should I not bother with any of this?
  9. Frequently asked questions
  10. Can Claude Code and Codex share the same instructions?
  11. Is there an official way to call Codex from Claude Code?
  12. Can Claude Code and Codex edit the same repository at the same time?
  13. Do I need two subscriptions to use both?
  14. How do teams use Claude Code and Codex together?
  15. Try it with your team

Guides

How do I use Claude Code and Codex together?

Four ways to use Claude Code and Codex together: a plan-build-review loop, the Codex plugin, one repo side by side, and a whole team. Steps and commands.

To use Claude Code and Codex together, give each one a clear job and one shared place to read from. Most people pick one of four setups: a plan-build-review loop where one agent writes and the other reviews; OpenAI's Codex plugin, which calls Codex from inside Claude Code; both agents side by side in one repository, each on its own branch; or, for a team, one shared project that every person's agent reads and writes. The first three work for one person at one desk with no extra tools. The fourth is where a shared project such as Joxo helps.

Why use two coding agents at all?#

Mostly for review. An agent reading its own diff tends to agree with itself; a model from another vendor has no memory of writing the code and asks different questions. Some people also split by taste, say planning and wide refactors in one and fiddly fixes and tests in the other. Don't trust anyone's ranking of which is better at what, ours included. It changes with every model release, and an afternoon on your own codebase tells you more.

What you pay for a second agent is coordination. The two read different instruction files. Neither can see the other's conversation. And nothing stops both from editing src/api/orders.ts in the same minute. Each setup below handles that differently.

What are the four ways to combine them?#

SetupBest forWhat you needWhere it strains
Plan, build, review loopOne person who wants a second opinionBoth CLIs, a plan fileYou copy text between sessions by hand
Codex plugin in Claude CodeClaude Code users who want Codex reviewsThe plugin, a ChatGPT plan or OpenAI API keyOne person's two tools only
Side by side in one repoParallel work on separate tasksGit worktrees, a shared AGENTS.mdWho is doing what lives in your head
One shared project for a teamSeveral people, each with their own agentA shared task list and decisions, or JoxoNeeds everyone to use the same place

How do I run a plan, build and review loop?#

Most forum threads on this land here, and it needs nothing beyond the two command-line tools: one agent writes a plan, the other builds it, the first reviews the result.

  1. Plan in one agent. In Codex or Claude Code, describe the feature and ask for a plan written to a file, not to the chat:

``text Read the code under src/orders/. Write a step-by-step plan for adding CSV export to PLAN.md: files to change, the tests to add, and the command that proves it works. Do not change any code yet. ``

  1. Build in the other. Open the second agent in the same folder and point it at the file:

``text Implement PLAN.md step by step. Run the tests after each step. Stop and write a note at the bottom of PLAN.md if a step is wrong. ``

  1. Commit before review, so the reviewer looks at a fixed diff:

``bash git add -A git commit -m "wip(export): first pass from PLAN.md" ``

  1. Review in the first agent. Ask it to read the diff against main and list real problems, with file and line, before it suggests any change. Codex has a built-in /review command inside a session; in Claude Code, ask for a review of git diff main...HEAD.

The plan file does the real work here. Both agents read it, and it is still there after you close either session. Keep each step small, so that when a test fails you know which step broke it.

How do I call Codex from inside Claude Code?#

OpenAI publishes an official Codex plugin for Claude Code. It runs your local Codex install from Claude Code, with the same login and settings Codex already has. It needs Node.js 18.18 or later and either a ChatGPT plan or an OpenAI API key, and its use counts against your Codex allowance.

Inside Claude Code:

/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
/reload-plugins
/codex:setup

/codex:setup checks whether Codex is installed and signed in. Then:

  • /codex:review runs a read-only Codex review of your uncommitted changes, or of your branch with --base main.
  • /codex:adversarial-review is a review you can steer, for example toward a caching or retry decision you are unsure of.
  • /codex:rescue hands a task to Codex in the background, with /codex:status and /codex:result to follow it.

Older guides tell you to run codex mcp-server and add it to Claude Code as an MCP server. That no longer works: OpenAI's page on the change says the command has been removed from Codex. For Claude Code, the plugin is the ready-made route. The other direction still exists: claude mcp serve starts Claude Code as a stdio MCP server that another client can connect to, as described in Claude Code's MCP documentation.

If you live in Claude Code and want Codex as a second reviewer, start with the plugin. What it won't do is give Codex a task list of its own, or tell anyone else what Codex just changed. How Joxo compares with the Codex plugin covers when you need more than that.

How do I run both side by side in one repository?#

When each agent has its own task, run them in parallel, each in its own git worktree so neither overwrites the other's files:

bash
git worktree add ../shop-claude -b claude/csv-export
git worktree add ../shop-codex -b codex/refund-emails

Open Claude Code in ../shop-claude and Codex in ../shop-codex. Each sees a full checkout on its own branch, and you merge through pull requests as usual. Running Claude Code and Codex in the same repo goes through branches, task ownership and the files that cause most collisions.

The second half of side-by-side work is shared rules. Codex reads AGENTS.md. Claude Code reads CLAUDE.md, and only falls back to AGENTS.md when there is no CLAUDE.md. Put the rules in AGENTS.md and make CLAUDE.md import it with one line, @AGENTS.md, so both agents follow the same text. Sharing context between Claude Code and Codex has the exact file layout and a handoff note template.

Rules cover what stays true for weeks. What changes during the day, such as who is on which task and what was decided an hour ago, needs its own small files that both agents are told to read first. How AI coding agents share context explains the two layers.

What changes when the agents belong to different people?#

So far this has all been one person switching between two tools. Teams look different. Maybe Sara runs Claude Code, Omar runs Codex and a third person is in Cursor, and the files that were fine at one desk start to fall behind:

  • A TASKS.md reaches a teammate's agent only after a push and a pull, so two agents can take the same task in the same minute.
  • A decision written to DECISIONS.md on one laptop is invisible to the agent on another until someone merges it.
  • A handoff note has to be pasted into the other person's session by hand.

You can fix this by hand. Claim the task on a shared tracker before anyone touches code, push decisions the moment they are made, and put handoff notes in the pull request. Two disciplined people can live with that for a long time. Running several AI agents on one project covers the habits, and team collaboration with Claude Code covers the people side.

Where does Joxo fit?#

Joxo gives a team's agents one shared project, whatever each person runs. Each teammate pastes one line into their own agent, Claude Code, Codex, Cursor, OpenCode or another one:

Read https://joxo.ai/skill.md and follow it to set up Joxo in this project.

From then on the agents share a task board, a team chat, decisions and handoffs:

  • One owner per task. When Claude Code takes a task, a second claim from Codex is refused, and Codex is told who holds it.
  • Decisions reach everyone. When one agent settles something other code depends on, such as an API shape, every teammate's agent reads it on its next turn.
  • Handoffs that land. A handoff carries the branch, the commit and a note into the receiving agent's next turn, so it continues instead of starting over.
  • Agents can talk. With Joxo Live, agent sessions of any vendor message each other by name, on one computer or across the team. It is on by default and can be turned off per computer.
  • Your phone. The iPhone app, in TestFlight beta, tells you when an agent is waiting on you, and you can answer it there.

Each person stays on their own plan: Claude Code on their Claude subscription, Codex on their ChatGPT plan. Nobody shares an account or an API key, and Joxo runs no model. Using your own AI subscription on a team explains why that matters. Some teams also mix in other models; using Chinese models with Claude Code covers GLM, Kimi and DeepSeek.

The setup lines per agent are on the setup page, and Joxo with Codex and Joxo with Claude Code say what changes in each. If what you want is the feeling of a whole team coding with agents at once, multiplayer AI coding describes what that looks like in practice.

When should I not bother with any of this?#

When one agent is already doing the job. A second one doubles the setup and the reviewing, and it only earns that back by catching what the first one missed. Run the plan, build and review loop on one real feature. If Codex's review turns up nothing your tests wouldn't have caught, stay with one agent.

Frequently asked questions#

Can Claude Code and Codex share the same instructions?#

Yes. Put the rules in AGENTS.md, which Codex reads, and add a CLAUDE.md that imports it with the line @AGENTS.md. Claude Code expands the import when a session starts, so both agents follow one set of rules, and you can still add a few lines that only Claude Code reads.

Is there an official way to call Codex from Claude Code?#

Yes. OpenAI's Codex plugin for Claude Code adds commands such as /codex:review, /codex:adversarial-review and /codex:rescue. It uses your local Codex login and settings, and needs Node.js 18.18 or later plus a ChatGPT plan or an OpenAI API key. The older codex mcp-server command has been removed from Codex.

Can Claude Code and Codex edit the same repository at the same time?#

Yes, if each works in its own git worktree on its own branch. Two agents in the same folder on the same branch overwrite each other's files. Worktrees keep their files apart, and a rule that each task has one owner keeps them off the same code.

Do I need two subscriptions to use both?#

Yes. Claude Code runs on a Claude plan or an Anthropic API key, and Codex runs on a ChatGPT plan or an OpenAI API key. On a team, each person signs in with their own plan. Sharing one account between people breaks both providers' terms.

How do teams use Claude Code and Codex together?#

Each person runs the agent they prefer, and the agents share one task list, one set of decisions and handoff notes. Teams can do this with shared files and strict habits, or with a shared project such as Joxo, where a task can have only one owner and handoffs arrive in the other agent's next turn.