How to run Claude Code and Codex together on one Mac
Short answer
Install both CLIs and sign in to each with its own plan; they keep separate logins, settings and limits. Put shared instructions in AGENTS.md: Codex always reads it, and Claude Code reads it when there's no CLAUDE.md (or when your CLAUDE.md imports it). Give each agent its own git worktree so they never edit the same files, and split the work by role, for example Claude Code writes and Codex reviews.
Why run both
Claude Code and Codex are separate agents from separate companies, with separate plans. Running both on one Mac gives you two things:
- A second opinion. One agent writes, the other reviews with a fresh context and a different model.
- Two allowances. Each plan counts its own usage. When one runs low, the other keeps going.
They don’t get in each other’s way: each keeps its own login, settings and conversation history. What you have to manage is the repository they share.
Vendor facts below come from the Claude Code docs and OpenAI’s Codex docs, checked November 14, 2026.
Install and sign in to each
Claude Code needs a Claude plan that includes it (Pro and up; the Free plan doesn’t) or an Anthropic Console account. Install it with the native installer from its setup docs (or brew install --cask claude-code), then run claude in your project and sign in:
curl -fsSL https://claude.ai/install.sh | bash
Codex works with a ChatGPT plan that includes it or an OpenAI API key. Install it with one of OpenAI’s three options:
npm install -g @openai/codex
Then run codex and choose Sign in with ChatGPT or an API key. The Codex install guide covers the other two installs and what each sign-in gives you.
Share one set of instructions
Both agents read project instructions from a file, but not the same one by default:
| Reads | Notes | |
|---|---|---|
| Codex | AGENTS.md |
Global ~/.codex/AGENTS.md, then one per folder from the repo root down, up to 32 KiB |
| Claude Code | CLAUDE.md |
Reads AGENTS.md instead when there’s no CLAUDE.md or CLAUDE.local.md (v2.1.277+) |
So you have two clean setups:
- Only
AGENTS.md. Both agents read it. This is the simplest. CLAUDE.mdthat importsAGENTS.md. Keep shared rules inAGENTS.mdand Claude-only notes inCLAUDE.md. If both files exist andCLAUDE.mddoesn’t importAGENTS.md, Claude Code reads onlyCLAUDE.md. The import syntax is in Claude Code’s memory docs.
Put in it what both need: how to install dependencies, how to run the tests, and what not to touch.
Keep them off each other’s files
Two agents in one folder edit the same files. Give each its own copy with a git worktree.
Claude Code makes one for you:
claude --worktree checkout-form
That starts the session in .claude/worktrees/checkout-form/ on a branch called worktree-checkout-form. On exit, a clean worktree is removed and one with work in it asks first.
Codex has a --worktree option on codex exec and codex fork. For an interactive session, make the worktree with git and start Codex inside it:
git worktree add ../shop-codex -b codex/payment-rounding
cd ../shop-codex && codex
Worktrees separate files, not processes. If both agents start a dev server on the same port, they’ll still collide.
Split the work by role
The pattern that works best is one writer and one reviewer:
- The writer works in its own worktree, on its own branch.
- The reviewer reads the writer’s diff and reports problems, without editing. Codex can run read-only with
--sandbox read-only; Claude Code has aplanmode that blocks edits until you approve a plan.
Swap roles by task, not by habit. And review and merge one branch at a time: parallel writing is fast, parallel merging is where conflicts show up.
Mind the two sets of limits
- Claude counts usage in 5-hour and weekly windows.
- Codex counts it in 5-hour windows, and weekly limits may also apply. The allowance depends on the model and the size of the task.
- Parallel sessions add up. Claude Code’s docs say ten sessions in parallel use quota about ten times as fast. Every Codex session draws on the same allowance too.
Running both doesn’t raise either plan. It gives you two to draw from.
Both on one board
This is the maker’s part, so weigh it accordingly. Tendeck is a native Mac app that runs coding agents on cards of one board, and Claude Code and Codex both get the whole board:
- Each card is the agent’s real terminal, or the same session read as a clean conversation with its steps and diffs.
- Accounts and limits on the card, for each Claude and Codex account.
- Permission requests answered from the card, and the card turns gold when its agent needs you.
- Each agent can work in its own copy of the repo, on its own branch. Tendeck makes it for you.
- One order to several agents. ⌘K sends it to one agent with
@name, or to every agent with@all. - Agents can write to each other, with your permission, so the writer can hand its diff to the reviewer.
Tendeck doesn’t include either CLI or any plan: you install both and sign in with your own accounts.
Related: Install Codex CLI on a Mac · Claude Code vs Codex · Codex on Tendeck · Run several agents in parallel · Use more than one Claude Code account
Questions people ask
Do Claude Code and Codex share usage limits?
No. Claude Code draws on your Claude plan and Codex on your ChatGPT plan or API key. Each counts its own usage, so running both spreads the work across two allowances.
Will Claude Code read my AGENTS.md?
Yes, when the project has no CLAUDE.md or CLAUDE.local.md. If it has a CLAUDE.md, Claude Code reads only that one, unless your CLAUDE.md imports AGENTS.md. Reading AGENTS.md directly needs Claude Code v2.1.277 or later.
Can both agents work in the same folder?
They can, but they will edit the same files and can undo each other's work. Give each one its own worktree, or keep one of them read-only, as a reviewer.
Which one should write and which should review?
Either way works. Many people let the one they trust more for the task write, and the other review the diff with a fresh context. Swap them when one runs low on its plan's usage.