Using Claude Code and Codex together (October 2026)
Plenty of people have stopped picking a side. Here's a workflow for running both agents on the same codebase without them stepping on each other: one instruction file, separate worktrees, each one reviewing the other's work, and two sets of limits for about $40 a month.
Last verified October 22, 2026 Every command, file name and price is checked against Anthropic's and OpenAI's own docs. Opinions are labelled Our take.
The short version
Keep one AGENTS.md as the source of truth: Codex reads it, and Claude Code reads it too when there's no CLAUDE.md (or import it with @AGENTS.md). Run each agent in its own git worktree. Let whichever agent didn't write the code review the diff with /review. Check /usage in both before a big job, and make sure no ANTHROPIC_API_KEY is quietly switching Claude Code to API billing. Claude Pro plus ChatGPT Plus is $40 a month for two separate sets of limits.
Why run both?
of T3 Code users who used Codex over a two-week stretch also used Claude Code, per Theo Browne (Oct 19, 2026). That's one app's users, not the whole market.
Claude Pro ($20) plus ChatGPT Plus ($20) gets you two separate sets of five-hour windows, less than Claude Max 5x or Codex Pro at $100 each.
different models looking at every change. Our take: a second agent reviewing the first one's diff catches things the author agent is blind to.
The same job in each CLI
| Job | Claude Code | Codex |
|---|---|---|
| Project instructions file | CLAUDE.md (or .claude/CLAUDE.md). Reads AGENTS.md when there's no CLAUDE.md | AGENTS.md (AGENTS.override.md wins in the same folder) |
| Generate that file | /init | /init |
| Pull in the other tool's setup | /import codex (add --dry-run to preview) | /import, then pick Claude Code |
| Plan before editing | /plan [description] | /plan [prompt] |
| Isolated parallel checkout | claude --worktree <name> (or -w) | /worktree, or codex exec --worktree "..." |
| See the diff | /diff | /diff |
| Review changes | /review (alias of /code-review) on the current diff, a branch, a path or a PR number | /review on the working tree, or codex review --uncommitted |
| Check plan usage | /usage (plan usage limits); the help center also points to /status | /usage for account usage; /status for model and token usage |
| Check which account is billing you | /status (shows account) | codex login status |
From Anthropic's Claude Code docs and OpenAI's Codex docs, verified October 22, 2026. Commands change often: run /help in Claude Code or type / in Codex to see what your version has. Full source list at the bottom of the page.
Both CLIs ship changes every week. Get the ones that matter in 5 minutes.
New commands, limit resets, price moves and new coding agents, every Friday. When this guide changes, subscribers hear first.
One email every Friday. New agent launches, price changes, zero fluff. Form not loading? Subscribe on Beehiiv ↗
How to run Claude Code and Codex on one codebase
- 01
Keep one instruction file: AGENTS.md
Codex reads
AGENTS.mdbefore doing any work. Claude Code now readsAGENTS.mdon its own too (v2.1.277 or later), but by default only when there's noCLAUDE.md,.claude/CLAUDE.mdorCLAUDE.local.mdin your working directory or above it. So the simplest setup is oneAGENTS.mdand noCLAUDE.md.Source: Codex docs: Custom instructions with AGENTS.md · Claude Code docs: How Claude remembers your project (CLAUDE.md and AGENTS.md)
- 02
Need Claude-only rules? Import, don't copy
Put
@AGENTS.mdat the top of aCLAUDE.mdand add the Claude-specific lines below it. Anthropic's docs say Claude reads the imported file first and never loads it twice. A symlink (ln -s AGENTS.md CLAUDE.md) also works if you have nothing Claude-specific. Either way you edit one file and both agents see the change.Source: Claude Code docs: How Claude remembers your project (CLAUDE.md and AGENTS.md)
- 03
Watch the CLAUDE.local.md trap
A
CLAUDE.local.mdcounts as a CLAUDE.md, so adding one for your personal notes quietly stops Claude from readingAGENTS.md. Fix it with/configand set Project instructions toclaude-md-and-agents-md. Also note Claude Code doesn't readAGENTS.override.mdorAGENTS.local.md, so keep shared rules in the plainAGENTS.md.Source: Claude Code docs: How Claude remembers your project (CLAUDE.md and AGENTS.md)
- 04
Give each agent its own worktree
Run
claude --worktree <name>for Claude Code (it creates.claude/worktrees/<name>/on a branch calledworktree-<name>) and/worktreeorcodex exec --worktreefor Codex. Add.claude/worktrees/to.gitignore. Our take: never let both agents edit the same checkout at once. It's the fastest way to lose an afternoon untangling half-applied changes.Source: Claude Code docs: Run parallel sessions with worktrees · Claude Code docs: CLI reference · Codex docs: CLI commands and slash commands
- 05
One plans, the other builds
Both CLIs have
/plan. Ask one agent for a plan, paste it into the other as the task, and keep the plan in the PR description. Our take: the planner doesn't need to be the expensive model. On Codex Plus, OpenAI estimates 350-3,000 GPT-6 Luna messages per five-hour window versus 15-160 for GPT-6.1 Sol.Source: Claude Code docs: Commands · Codex docs: CLI commands and slash commands · Codex pricing and usage limits (OpenAI developers)
- 06
Cross-review every diff
Whoever didn't write the code reviews it. In Claude Code,
/review(an alias of/code-review) reviews the current diff, or a branch, path or PR number you pass. In Codex,/reviewreviews your working tree andcodex review --uncommitteddoes the same from a script. For Codex's GitHub reviews, a## Code Review Rulessection inAGENTS.mdtells it what to flag.Source: Claude Code docs: Commands · Codex docs: CLI commands and slash commands · Codex docs: Custom instructions with AGENTS.md
- 07
Check both meters before a big job
In Claude Code,
/usageshows your plan usage limits (the help center also points to/status). In Codex,/usageopens account usage and/statusshows the model and token usage. Start a long refactor on whichever agent has more room left.Source: Claude Code docs: Commands · Claude Help Center: Use Claude Code with your Pro or Max plan · Codex docs: CLI commands and slash commands
- 08
Make sure you're on the subscription, not the API
If an
ANTHROPIC_API_KEYenvironment variable is set, Claude Code uses it instead of your Pro or Max plan and you pay API rates. Codex works the same way in reverse: if you signed in with an API key, it uses standard API pricing instead of your ChatGPT plan. Check with/statusin Claude Code andcodex login statusin Codex.Source: Claude Help Center: Use Claude Code with your Pro or Max plan · Claude Code docs: Commands · Codex docs: Authentication
Keeping AGENTS.md and CLAUDE.md in sync
Pick one direction. The default most teams want: AGENTS.md holds everything, and CLAUDE.md is either missing or a two-line import.
# AGENTS.md
# Codex reads this. Claude Code reads it too when there's no CLAUDE.md.
## Commands
- Install: npm install
- Test: npm test (run after every change)
- Lint: npm run lint before opening a PR
## Conventions
- TypeScript strict, no default exports
- Never edit files under generated/# CLAUDE.md (only if you need Claude-only notes)
@AGENTS.md
## Claude Code
- Use plan mode for changes under src/billing/Going the other way is possible too: Codex can treat extra file names as instructions. It checks AGENTS.override.md, then AGENTS.md, then your fallback names in each folder, and stops adding files at 32 KiB by default (project_doc_max_bytes).
# ~/.codex/config.toml
# The other direction: let Codex read CLAUDE.md
project_doc_fallback_filenames = ["CLAUDE.md"]Sources: Claude Code docs: How Claude remembers your project (CLAUDE.md and AGENTS.md) · Codex docs: Custom instructions with AGENTS.md
Two terminals, two worktrees, one review loop
# terminal 1: Claude Code builds the feature in its own worktree
claude --worktree feature-auth
# terminal 2: Codex takes a different task in its own worktree
codex # then type /worktree
# before Claude commits, ask Codex for a second opinion from Claude's worktree
cd .claude/worktrees/feature-auth
codex review --uncommitted # or /review inside a Codex session
# and the other way round, from a Claude Code session
/review worktree-feature-auth # reviews a branch, path, PR number or the current diffClaude Code puts the worktree at .claude/worktrees/feature-auth/ on a branch named worktree-feature-auth. A worktree is a fresh checkout, so install dependencies there first. If you don't name it, Claude makes one up. When you exit a clean, unnamed worktree session, Claude removes the worktree and its branch for you.
Sources: Claude Code docs: Run parallel sessions with worktrees · Codex docs: CLI commands and slash commands
Splitting the work
Claude Code
Claude Pro $20 ($17/mo annual), Max 5x $100, Max 20x $200
Where it's strongest
- Developers comfortable in the terminal who want an agent that edits, runs and tests code
- Long, multi-step changes such as migrations and refactors
- Teams already standardised on Claude
OpenAI Codex
ChatGPT Free, Go $8, Plus $20, Pro $100/$200/$500
Where it's strongest
- ChatGPT subscribers who want an agent at no extra cost
- Delegating parallel cloud tasks and automatic PR review
- CI automation via API key
Our take: don't overthink the split. Give the long, multi-step change to whichever agent has more headroom left this window, and let the other one review it. If you're on Codex Plus, its cloud integrations (automatic code review, Slack) are included, so it's a natural reviewer for PRs. Our Claude Code vs Codex comparison has the full side-by-side.
What two subscriptions get you
- Claude: The limits are shared across Claude on the web, desktop and mobile and Claude Code, including the IDE extensions. Everything you do in both counts against the same meter.
- Codex: Codex and ChatGPT Work share usage. On Plus, OpenAI estimates local messages per five-hour window by model, and weekly limits may also apply. Pro plans currently have no five-hour limit.
- When one runs out, switch to the other instead of paying API rates. Both let you keep going at pay-as-you-go prices too (Claude usage credits, ChatGPT credits), but set a cap first.
Watch out: If an ANTHROPIC_API_KEY environment variable is set, Claude Code uses it instead of your subscription and you pay API rates. The same goes for Codex: signed in with an API key, it bills standard API pricing instead of your ChatGPT plan.
Every coding agent's usage limits, explained → Pricing cheat sheet →
FAQ
Can I use Claude Code and Codex in the same repo?
Yes. Both work on your local repository from the terminal. Give each one its own git worktree (claude --worktree <name> for Claude Code, /worktree or codex exec --worktree for Codex) so their edits don't collide, and share one AGENTS.md for project instructions.
Does Claude Code read AGENTS.md?
Yes, from v2.1.277. By default it reads AGENTS.md only when there's no CLAUDE.md, .claude/CLAUDE.md or CLAUDE.local.md in your working directory or above it. To read both, set Project instructions to claude-md-and-agents-md in /config, or put @AGENTS.md at the top of your CLAUDE.md.
Does Codex read CLAUDE.md?
Not by default. Codex looks for AGENTS.override.md and AGENTS.md. You can add other file names, such as CLAUDE.md, with project_doc_fallback_filenames in ~/.codex/config.toml; Codex checks them only when a folder has no AGENTS.md.
How much does it cost to run both?
Claude Pro is $20 a month ($17 a month billed annually) and ChatGPT Plus is $20 a month, so about $40 a month for two separate sets of limits. That's less than Claude Max 5x or Codex Pro at $100 each. Claude's limits are shared with the Claude apps, and Codex's are shared with ChatGPT Work.
Do Claude Code and Codex share usage limits?
No. They're different companies and different subscriptions, so each has its own meter. Claude Pro and Max have a five-hour session limit and a weekly limit. Codex on Plus uses five-hour windows, and weekly limits may also apply.
Can I move my Claude Code setup to Codex, or the other way round?
Both have an /import command. In Codex, /import lets you pick Claude Code and migrate supported setup, project files and recent chats. In Claude Code, /import codex brings over instruction files, MCP servers, commands, subagents and skills; add --dry-run to preview first.
Why am I being billed API rates in Claude Code?
Most likely an ANTHROPIC_API_KEY environment variable is set. When it is, Claude Code uses that key instead of your Claude subscription and you pay API usage charges. Unset it and log in with your Pro or Max account.
How many developers use both?
One data point: on October 19, 2026 Theo Browne posted that over 60% of T3 Code users who used Codex in the previous two weeks also used Claude Code. That's one app's users, not the whole market.
Sources
- Claude Code docs: How Claude remembers your project (CLAUDE.md and AGENTS.md) (code.claude.com)
- Claude Code docs: Commands (code.claude.com)
- Claude Code docs: Run parallel sessions with worktrees (code.claude.com)
- Claude Code docs: CLI reference (code.claude.com)
- Claude Help Center: Use Claude Code with your Pro or Max plan (support.claude.com)
- Claude pricing (claude.com)
- Codex docs: Custom instructions with AGENTS.md (developers.openai.com)
- Codex docs: CLI commands and slash commands (developers.openai.com)
- Codex docs: Authentication (developers.openai.com)
- Codex pricing and usage limits (OpenAI developers) (developers.openai.com)
- @theo on X: T3 Code usage data (Oct 19, 2026) (x.com)
- Claude Help Center: Usage credits for paid Claude plans (support.claude.com)
- Claude Help Center: Usage limit best practices (support.claude.com)
- Claude Code v2.1.304 release notes (Oct 19, 2026) (github.com)
Last verified October 22, 2026. Commands, file names and prices come from the pages above as they read that day. The T3 Code figure is from Theo Browne's post on X, not a vendor page. Spot something out of date? Email [email protected].
Keep going
Claude Code vs Codex → Usage limits explained → Pricing cheat sheet → All tools →