Two terminals, one repo, no collisions

Solo buildersSolo builder running two agents side by side

We ran Claude Code on the API and Codex on the dashboard at the same time. Both noticed the same broken type and both started fixing it, and the second fix overwrote the first.

How do I stop Claude Code and Codex from fixing the same bug at the same time in one repo?

With ArcRoom, each agent calls claim_task before it starts a task. If the other agent already claimed it, it is told so and moves on to something else. When the first one finishes, complete_task releases the claim and records the result for the other. Claims only work for agents that call claim_task, and two agents editing the same file for different reasons can still collide.

Also asked as: Two AI agents overwrote each other's fix in my repo. How do I prevent that? · How do I run two AI agents side by side on one codebase safely? · Can Claude Code see that Codex is already working on a task?

The work

Before starting a task, an agent calls claim_task.

ArcRoom keeps
  • Claim
  • Saved answer
The next agent gets

claim_task → already claimed by codex (4 min ago): "fix PlanTier type in shared/types.ts"

Step by step

  1. Before starting a task, an agent calls claim_task.
  2. If the other agent already claimed the same task, it is told so and moves on to something else.
  3. When the first one finishes, complete_task releases the claim and records the result for the other.

What the agent sees

claim_task → already claimed by codex (4 min ago): "fix PlanTier type in shared/types.ts"
Pick another task or wait.

Compared with today's tools

Git worktrees + a shared TODO.md

Give each agent its own worktree or branch and keep a TODO.md that says which agent owns which fix.

Setup
10 min
Ongoing
update TODO.md and merge branches by hand

ArcRoom

Every agent reads the team playbook before it works and writes to it when it finishes. Nothing to update by hand.

Setup
2 min (npx arcroom init)
Ongoing
None

Separate worktrees stop overwrites better than claims do; they don't stop both agents spending tokens on the same fix.

Where it stops

Claims only work for agents that call claim_task. Two agents editing the same file for different reasons can still collide.

Try it in your project

Works with the agents your team already uses, and any agent over MCP or the HTTP API.

More in solo builders