← All case studies
Internal system · git worktrees, multi-agent setup

Running Claude Code
and Codex together

Two AI coding agents share one codebase, each running on its own token budget and its own working directory, so neither one blocks the other and neither one can overwrite the other's work mid-edit. This page documents how it is wired, not a claim about which agent performs better.

Verified live. No performance benchmark yet.
CASE STUDY
THE PROBLEM

Two subscriptions, one repo, no collision plan.

Claude Code was already the daily driver on this repo, and a Codex subscription was sitting unused alongside it. Running both against the same working directory risks one agent's uncommitted edit getting overwritten by the other mid-task. If Claude Code ever hits a context or usage limit, work on the repo stops entirely unless something else can pick it up. The fix: give each agent its own working directory on the same git history, plus a clear boundary for who owns what.
CASE STUDY
HOW IT'S BUILT

One repo, two worktrees, one shared rulebook.

Same repo, isolated filesgit worktree add ../command-center-codex -b codex-work main checks out a second working copy against its own branch: same commit history, independent files on disk, so a git conflict is the worst case, never a silent overwrite.
Separate token budgetsClaude Code runs on its own usage pool, Codex on its own OpenAI subscription. One running out does not block the other.
Same operating rules, mirrored filesBoth agents follow the same WAT framework (Workflows, Agents, Tools). Claude Code reads CLAUDE.md and Codex reads AGENTS.md, kept as hand-synced mirrors of each other.
Clear scope splitCodex owns the self-contained apps/* subprojects with no path dependency on the repo root. Claude Code keeps the shared core: workflows, tools, and context every automation depends on.
No silent mergeWork on the codex-work branch stays isolated until someone deliberately merges it back into main. Nothing reconciles the two automatically.
CASE STUDY
WHAT'S HONEST HERE

A setup, not a performance claim.

This page documents that the split works mechanically: two agents, no file collisions, independent budgets, a shared rulebook. It does not claim that running two agents in parallel produces better or faster results than one agent working alone, because that has not been measured yet. A follow-up case study, run against a real shared task with both setups compared, is the honest way to make that claim if the numbers back it up.

Known gap worth knowing: gitignored files (.venv, secrets/, .env/, each app's node_modules) do not carry over to the new worktree automatically. Codex can read and edit code immediately in either worktree, but actually running a given app's code needs that app's dependencies and secrets copied in first.
CASE STUDY
COMMON QUESTIONS

What people ask about running two AI coding agents together.

Can Claude Code and Codex work on the same repository at once?Yes, using a git worktree. Each agent gets its own checked-out working directory on its own branch, sharing the same repository history, so edits never collide.
What does a git worktree actually do here?It checks out a second working directory against a different branch of the same repository, giving each agent an isolated file system while both stay on the same commit history.
Is this faster than one agent working alone?Unmeasured so far. This page is the setup story; a speed or quality comparison needs a real shared task run through both setups and measured directly.

Curious how this applies to your stack?

Happy to walk through the setup live, including where it would and would not make sense for your team.