Sign inGet started
All insights
Agents, MCP & Prompting

What's the best way to have Claude Code and Codex work together for a single project??

By SkillzBench · October 17, 2026

Learn how to combine Claude Code and Codex in one project with structured handoffs, worktrees, and verification gates—plus research-backed tips to avoid...


Key Facts

Why Two Agents Often Make Things Worse, Not Better

Two AI coding agents, working side by side on the same project, sounds like a productivity dream. The research says otherwise: paired agents can lose nearly half their capability compared with a single agent working alone.

That finding comes from Stanford's CooperBench, which evaluated more than 650 real-world coding tasks across Python, TypeScript, Go, and Rust. Stanford HAI researcher Hao Zhu calls it "the curse of coordination — a single model is better than two agents sharing the work," according to the study's coverage. The surprise is where the failure lives: not in coding skill, but in social intelligence.

Anthropic's own multiagent research reinforces the point. When agents collaborate as "distinct, long-lived peers" on a shared codebase, results deteriorate — a 12-hour game-building experiment produced poor outcomes under every prompt strategy tested, with agents requiring significant human direction to stay on track. In one striking example, 18 of 30 agents independently chose the same git branch name, showing how identical agents make identical bad decisions.

So what does "the curse of coordination" actually look like in a Claude Code + Codex project? CooperBench documented specific, recognizable failure modes:

  • Agents overwriting each other's code without noticing
  • Warnings from teammates being ignored entirely
  • Repetitive, low-value status updates instead of real progress
  • Questions going unanswered and commitments going unfulfilled

More troubling: communication between agents had almost no impact on success. Fluent, confident language often masked failures rather than resolved them — two agents could talk constantly and still produce broken work. And better prompting doesn't fix it; Zhu notes agents must be trained to collaborate, with verification mechanisms and contract-like agreements between them.

This is the real risk you take on when you point both tools at the same repository. You want Claude's planning depth and Codex's implementation speed, but without structure you inherit the coordination tax both research teams identified. The good news is that the failure is specific to unstructured peer collaboration — not to using two tools. Anthropic found agents perform well when treated as tool invocations with well-defined inputs and outputs, and its vulnerability-detection experiment showed parallel approaches can be largely complementary rather than redundant.

That's the distinction this article builds on: sequential handoffs with clear roles beat open-ended teamwork. If you're equipping both agents with skills or review instructions, keeping those consistent and verified matters — SkillzBench is building exactly that kind of free, benchmarked skills directory for agents like Claude Code and Codex.

The Pattern That Works: Structured Handoffs, Not Peer Collaboration

The evidence points to one clear conclusion: Claude Code and Codex work best together when you stop treating them as teammates and start treating them as specialized tools in a pipeline. Anthropic's own multiagent research found agents perform well when they interact as "tool invocations with well-defined inputs (prompts) and outputs (responses and artifacts)" — but stumble badly when left to collaborate as "distinct, long-lived peers" with no hierarchy.

The numbers behind structured coordination are striking. In Anthropic's vulnerability-detection experiment, independent agents found 21 vulnerabilities, while a coordinating swarm found 266 — and only 12 of those findings overlapped. That gap reveals the real value of pairing two different agents: they bring largely complementary perspectives, not redundant ones.

OpenAI's guidance reinforces the discipline this requires. Its practical guide to building AI agents advises teams to "maximize a single agent's capabilities first," splitting into multiple agents only when complexity genuinely demands it. In other words, don't add Codex to a Claude Code project for novelty — add it because a specific role needs filling.

The pattern that works in practice:

  • Plan — one agent produces a read-only plan or research brief with a well-defined output.
  • Implement — the second agent receives that artifact as input and writes the code, ideally in an isolated worktree.
  • Review — a dedicated pass (human or agent) verifies the handoff before anything merges.

This plan → implement → review sequence matters because Stanford's CooperBench study showed peer-style collaboration is where things fall apart: paired agents "lose nearly half their capability" versus a single agent, with social coordination — not coding skill — as the bottleneck. Sequential handoffs sidestep that failure mode entirely, since each agent works alone on a clearly scoped task.

The good news is that both ecosystems support this pattern natively. VS Code's multi-agent development features let you delegate between Claude and Codex agents from a single Agent Sessions view, with custom agents built around handoffs — a read-only research agent feeding an implementation agent, for example.

You can standardize each stage of this pipeline with agent skills — reusable SKILL.md instruction packages that both Claude Code and Codex understand. SkillzBench is building a free directory and MCP connector for exactly this: discover, verify, and benchmark skills so each handoff in your pipeline runs on tested, security-scanned instructions rather than guesswork.

Your Integration Hub: VS Code's Multi-Agent Setup and Run Modes

If you want Claude Code and Codex working on the same project, there's one officially supported way to do it: VS Code's multi-agent setup, introduced in v1.109. It runs Claude, Codex, and GitHub Copilot side by side in a single Agent Sessions view — where you can delegate tasks between agents, compare their outputs, and pick the right tool for each job.

The release defines three run modes, and choosing the right one matters:

  • Local — the agent works interactively in your editor while you steer it in real time. Best for exploratory work where you want tight control.
  • Background — the agent runs unattended in an isolated git worktree, so its changes can't collide with yours. Ideal for async tasks like tests or documentation.
  • Cloud — the agent works autonomously and surfaces results through a pull request your team can review. Best suited to well-defined refactors or isolated changes.

The setup also supports custom agents with handoffs — for example, a read-only research agent that investigates a codebase, passes findings to a full-editing implementation agent, then hands off to a security agent for review. That structure matters more than it sounds. Stanford's CooperBench study found paired agents "lose nearly half their capability" when collaborating as peers, with social coordination — not coding skill — as the bottleneck. Agents overwrote each other's code, ignored warnings, and made commitments they never fulfilled.

Sequential handoffs with specialized roles avoid that failure mode entirely. Anthropic's multiagent research reached the same conclusion: agents work well when they treat each other as tool invocations with well-defined inputs and outputs, but stumble as long-lived peers with no hierarchy. Their vulnerability-detection experiment showed the payoff — a coordinating swarm found 266 vulnerabilities versus 21 for independent agents, with almost no overlap between the two approaches.

VS Code v1.109 also supports parallel subagents that run in isolated contexts, with only final results flowing back to the main session, and ships with Anthropic's Agent Skills standard generally available. Skills are worth a moment here: they're the instruction packages that standardize how agents handle tasks like code review or security scanning across tools. Since roughly 26% of published skills carry at least one vulnerability, it's worth verifying what you install — SkillzBench is building a free directory that security-scans, benchmarks, and version-pins skills for Claude Code, Codex, and other agents.

One caveat: structure doesn't remove the need for a human in the loop. Only 29% of developers trust AI output to be accurate, and 66% call it "almost right, but not quite." Treat the Agent Sessions view as your coordination hub — you delegate, compare, and approve, while each agent does what it does best.

A Practical Workflow: Roles, Worktrees, and Verification Gates

The difference between a two-agent workflow that ships code and one that produces merge conflicts and near-misses comes down to structure. Here's a workflow that puts the research into practice.

Step 1: Put a human in the coordinator seat. With only 29% of developers trusting AI output to be accurate — and 66% describing results as "almost right, but not quite" — the senior engineer reviewing and owning architecture is where the most value gets created. You decide what each agent works on, review every handoff, and own the final merge.

Step 2: Split work into non-overlapping sub-problems. Anthropic's multiagent research found that parallel agents on independent problems produced "largely complementary" results — a coordinating swarm found 266 vulnerabilities where independent agents found 21, with only 12 overlapping. Assign Claude Code the API layer, Codex the frontend, or split by module — never have both agents editing the same files.

Step 3: Isolate with git worktrees. VS Code's multi-agent development support uses worktree isolation for background agents precisely because it prevents merge conflicts. Each agent gets its own branch and working tree, and you merge deliberately.

Step 4: Insert verification gates between handoffs. Stanford's CooperBench researchers recommend verification mechanisms for agent commitments, contract-like agreements, and periodic code-integration checks — because paired agents that lack them lose nearly half their capability versus a single agent. Cloudflare validated this pattern in production: a coordinator agent deduplicates findings and judges severity before anything reaches humans, across tens of thousands of merge requests.

Step 5: Write down the boundaries. Governance guidance is simple: document which tasks agents can do alone and which need human approval. A typical split looks like:

  • Agent-autonomous: tests, docs, refactors in isolated modules, code review drafts
  • Human-required: schema changes, dependency upgrades, anything touching auth or payments
  • Verification: every handoff gets tests, a security pass, and an integration check

That security pass matters more than most teams expect: Veracode found 45% of AI-generated code contains a security vulnerability. Agent skills (SKILL.md instruction packages) can standardize these review and verification steps across both agents, so Claude Code and Codex follow the same checklist instead of two ad-hoc processes. SkillzBench is building a free, security-scanned, benchmarked directory of skills plus a free MCP connector, so each agent can be equipped with a vetted loadout rather than whatever instructions happen to be lying around the repo.

The pattern holds at every scale: structured handoffs with a human coordinator beat unstructured peer collaboration, every time the research measures it.

Frequently Asked Questions

Can Claude Code and Codex work on the same project at the same time?
Yes, but not as free-roaming teammates. Stanford's CooperBench study found paired agents working as peers lose nearly half their capability versus a single agent, so the winning pattern is structured handoffs — one agent plans, the other implements, with a review pass in between.
What's the officially supported way to run Claude Code and Codex together?
VS Code's multi-agent setup (v1.109) runs Claude, Codex, and Copilot side by side in a single Agent Sessions view where you can delegate tasks and compare outputs. It offers three run modes: local for interactive steering, background with worktree isolation, and cloud for PR-based refactors.
Why do two AI agents collaborating often perform worse than one?
It's a coordination problem, not a coding problem — Stanford researchers call it "the curse of coordination," noting that social intelligence, not coding skill, is the key bottleneck. Documented failures include agents overwriting each other's code, ignoring warnings, and making commitments they never fulfill.
How should I split work between Claude Code and Codex?
Assign them non-overlapping sub-problems — for example, Claude Code on the API layer and Codex on the frontend — and never let both edit the same files. Anthropic's research found independent agents produce largely complementary results: a coordinating swarm found 266 vulnerabilities versus 21 for independent agents, with only 12 overlapping.
Do I still need a human reviewing the agents' work?
Absolutely. Only 29% of developers trust AI output to be accurate, and 66% call it "almost right, but not quite" — so a senior engineer coordinating tasks, reviewing handoffs, and owning the final merge is where the most value gets created. Write down which tasks agents can do alone and which need human approval, like schema changes or anything touching auth.
How can I make sure both agents follow the same review and verification standards?
Use agent skills — reusable SKILL.md instruction packages that both Claude Code and Codex understand — to standardize review and verification steps instead of relying on two ad-hoc processes. Since roughly 26% of published skills carry at least one vulnerability, SkillzBench is building a free directory that security-scans, benchmarks, and version-pins skills, plus a free MCP connector to equip each agent with a vetted loadout.

Two Agents, One Pipeline: Your Next Move

The answer to combining Claude Code and Codex isn't more teamwork — it's more structure. Peer collaboration costs paired agents nearly half their capability, but sequential handoffs flip the equation: a coordinating swarm in Anthropic's research found 266 vulnerabilities where independent agents found just 21, with almost no overlap between them. The pattern is simple — plan with one agent, implement with the other in an isolated worktree, review every handoff, and keep a human owning the merge. VS Code's Agent Sessions view gives you the hub to run it, and agent skills give both tools the same vetted playbook for planning, review, and security checks instead of two ad-hoc processes. Since 45% of AI-generated code contains a security vulnerability, standardizing those verification steps matters. SkillzBench is building a free, security-scanned directory of benchmarked skills plus a free MCP connector so you can equip each agent with tested instructions. Join the waitlist and be first to browse skills proven to lift your pipeline — free, always.

Claude Code + Codex: How to Run Both on One Project · SkillzBench