Skip to main content

Running Claude Code and Codex Together: A Role-Split Workflow

Some developers don't pick one over the other — they run Claude Code and Codex side by side, splitting implementation and review between them. Here's how to set that up and what to watch for.

By
🌐 This article was machine-translated and may contain inaccuracies. Read the Korean original if in doubt.

Instead of picking Claude Code or Codex (OpenAI's terminal coding tool) as "the one," some developers run both on the same project and split the work between them — one implements, the other reviews. The reasoning behind this pattern is straightforward: a model that reviews its own code tends to miss the same blind spots it had while writing it, so having a different model cross-check the diff catches issues that would otherwise slip through. This isn't a "which tool is better" comparison — it's a practical, step-by-step walkthrough for setting the two up together: install, role assignment, and the points where people typically get stuck. If both tools are already installed, expect about 20-30 minutes to wire up the role split and run through one implement-review cycle.

🟢 Model references match the current lineup · model notice
🟢 Model references match the current lineup · Claude Opus 5 / Claude Sonnet 5 / Claude Haiku 4.5 (higher tier: Claude Fable 5.1). This notice changes only when Anthropic ships a new model.
Define requirements Claude Code implements Codex reviews (/review) Apply fixes Commit

What you'll be able to do after this

By the end of this guide, you'll be running Claude Code and Codex side by side on one project and completing at least one full role-split cycle — for example, "Claude Code implements, Codex reviews." If both CLIs are already installed, setting up the role split and running the first cycle takes about 20-30 minutes. If you're installing both from scratch, including account sign-in, budget closer to 40 minutes.

Before you start

Check these before you begin so you don't get stuck partway through.

  • Operating system — macOS or Linux is recommended. On Windows, Codex uses its own native sandbox by default, but is guided toward WSL2 (a Linux environment that runs inside Windows) when your repository already lives there or the native sandbox doesn't work in your setup. Check the exact guidance shown during installation.
  • Node.js/npm — both tools can be installed via npm (Node.js's package manager), so make sure it's installed first.
  • A Claude account — Claude Code signs in with a Claude plan: Free, Pro ($20/month), or Max ($100 or $200/month).
  • A ChatGPT account — Codex signs in with a ChatGPT account. Check OpenAI's official pages for the exact plan requirements for using Codex.
  • Basic terminal familiarity — both are CLI (command-line interface) tools, meaning you type commands into a terminal instead of clicking through a graphical app.

Quick glossary

  • CLI — command-line interface. A way of running and controlling a program by typing commands into a terminal.
  • Subagent — a helper agent that works in its own separate space on one specific sub-task and returns only the result, without cluttering the main conversation.
  • AGENTS.md — a shared project-instructions file standard that Codex and several other AI coding tools read by default. It's where you write "here's how to work in this project."
  • CLAUDE.md — the project-instructions file that Claude Code reads from the project root.
  • Confirmation bias — here, the tendency for a tool (model) to miss its own mistakes when it reviews the very code it just wrote.
  • Diff — the set of changes between a file's before and after versions.

Why run both — the logic behind the role split

The core reason to run both tools is that a model reviewing its own output can repeat the same blind spot it had while writing it. Codex's /review command is documented as a read-only reviewer that analyzes a diff and reports prioritized findings without touching your working files — and using it as a second check on code Claude Code just implemented is a workflow pattern that's been documented in practice. The reverse also works: Codex implements, Claude Code reviews. Which one implements is really a matter of team preference and the nature of the task.

Shared instructions CLAUDE.md ↔ AGENTS.md Claude Code (claude) Implementation Can use .claude/agents/ subagents Codex (codex) Review /review — read-only, no file changes

If the two tools understand the project's rules differently, the role split loses much of its point, so it's worth keeping the project instructions in sync. Codex reads AGENTS.md by default and Claude Code reads CLAUDE.md, so importing AGENTS.md's contents inside CLAUDE.md, or linking the two files together with a symbolic link (an OS-level pointer that makes one file also accessible under another name), lets one edit update the rules both tools see. Check Claude Code's official memory documentation for the exact import syntax.

Step-by-step setup

  1. Install both CLIs. Run each of these in your terminal:

    npm install -g @anthropic-ai/claude-code
    npm install -g @openai/codex

    Codex can also be installed via Homebrew (brew install codex) or OpenAI's official install script instead of npm. Success looks like — running claude --version and codex --version each prints a version number.

  2. Sign in to each tool. In your project folder, run claude and sign in with your Claude account, then run codex and sign in with your ChatGPT account. Success looks like — each tool's interactive prompt appears after sign-in with no error message.

  3. Consolidate your project instructions. Write a CLAUDE.md at your project root, and if you're also maintaining an AGENTS.md, link the two:

    ln -s AGENTS.md CLAUDE.md

    Alternatively, add an import reference to AGENTS.md inside CLAUDE.md (check Claude Code's official memory docs for the exact syntax). Success looks like — running cat CLAUDE.md shows or reflects the AGENTS.md content.

  4. Decide the role split. For example: "Claude Code implements, Codex reviews." Write this down for your team. For larger implementation tasks, Claude Code subagents (configured under .claude/agents/) can split the work further and run parts in parallel.

  5. Implement with the assigned tool. Run claude in your terminal and describe the feature you want. Commit the result when it's done. Success looks likegit status shows only the files you intended to change.

  6. Review with the other tool. In the same project, run codex and type /review. This command runs read-only — it doesn't modify your working files — and analyzes the diff you just created, returning prioritized findings. Success looks like — a list of findings is printed, and git status afterward still shows no additional file changes.

  7. Apply the findings. Bring Codex's findings back to your Claude Code session, ask for fixes, repeat steps 5-6 if needed, and make a final commit.

Common snags and fixes

Most first-time friction comes from the two tools having different default file conventions and run environments.

  • Claude Code doesn't seem to pick up AGENTS.md — Claude Code doesn't read AGENTS.md by default. Double-check the symlink or import from step 3 is actually in place.
  • The two tools clash on the same file — running both CLIs on the same project at the same time can produce overlapping edits to the same file. It's safer to commit the implementer's work first, then run the reviewer.
  • Codex install or run is flaky on Windows — if your repo lives in WSL2 or the native sandbox doesn't work for your setup, you're guided toward the WSL2 path. Follow the prompts shown during install.
  • You want to change which model does the review — Codex documentation describes a review_model setting in its config file (~/.codex/config.toml) for specifying a dedicated review model; if unset, it uses the current session's model. The exact option name can shift between versions, so confirm it against the current docs or in-app help before relying on it.

Taking it further

Once the basic cycle (implement → review → apply) feels routine, you can register purpose-specific subagents under .claude/agents/ on the Claude Code side to break implementation into smaller parallel pieces. Codex also supports running multiple subagents concurrently, so the review side can be split by concern too — a security-focused pass and a performance-focused pass run in parallel, for instance. The exact concurrency limits and option names for subagents can change between versions, so verify against each tool's official docs before depending on them. If you keep both tools running for extended periods, keep an eye on Claude Code's usage limits — see the Claude usage limits guide for plan-by-plan details.

Frequently asked questions

Q. Does running Claude Code and Codex together mean paying for both?
Yes — they're separate accounts on separate pricing. Claude Code authenticates against a Claude plan (Free, Pro, or Max) and Codex against a ChatGPT account, each following its own pricing terms, so check each vendor's official pricing page for exact figures.

Q. Why split the work at all — can't one tool implement and review?
A single tool can do both, but a model reviewing code it just wrote tends to repeat the same blind spots it had while writing it — that's the reasoning behind this workflow. Cross-checking with a different model reduces that confirmation bias.

Q. Do I need to maintain CLAUDE.md and AGENTS.md as two separate files?
No — you can consolidate them. Codex reads AGENTS.md by default and Claude Code reads CLAUDE.md, so linking the two files (via symlink or an import reference) lets a single edit update the rules both tools follow.

Q. Is it safe to run both tools on the same project at the same time?
It's technically possible, but the two tools editing the same file at the same time can easily conflict. It's safer to commit the implementer's work first, then run the reviewer afterward, rather than running them truly in parallel.

Keep reading