To use Claude Code and Codex side by side without collisions, split the work by task, not by file: each task has one owner, and each agent works in its own checkout. The tool matters less than that rule. This post is the splitting advice; the tested setup is in Claude Code and Codex Working Together.
Three rules
- One owner per task. Two agents editing the same files at the same time is where work gets lost. Hand out whole tasks ("add the export endpoint"), not shared files.
- Separate checkouts. In Crewly, agents share the project directory by default. Per-task git worktrees are an opt-in setting per project; turn it on when two agents write code at once. A reviewer that only reads does not need its own.
- Say who reviews. Decide before the work starts which agent checks which commit. See reviewing each other's code.
Ways to split
| Split | Works when | Watch for |
|---|---|---|
| Writer and reviewer | One feature, one commit at a time | The one we tested; slower than two writers |
| Two writers, two features | Features touch different folders | Needs separate checkouts |
| Implementation and tests | Tests are specified up front | Both agents must read the same spec |
Who hands out the work
With one task you can paste it into the right terminal yourself. With several in flight, put a team lead in the team. Crewly's lead delegates tasks to members, so you describe the goal once. Which CLI the lead runs on is your choice; we did not compare.
What we have not measured
We did not benchmark Claude Code against Codex on any kind of task, so we do not claim one is better at refactoring, tests or review. The only tested split is Claude Code writing and Codex reviewing, on macOS, in one small run.
FAQ
Which tasks should go to Claude Code and which to Codex?
We have not measured which CLI is better at what, so we do not give a rule. Start with the split we tested: one writes, the other reviews. Then move tasks by what you already trust each tool with.
How do I stop two agents editing the same files?
Give each task one owner, split by task rather than by file, and give agents separate checkouts. In Crewly, agents share the project directory by default; per-task git worktrees are an opt-in setting per project.
Do I need a lead agent?
Not for two agents and one task. With several tasks in flight, a team lead that delegates saves you from assigning each one by hand.