Can I run several AI coding agents at once?
A short learning video. A renovation company owner who lost half a page when two coding agents shared one folder, and a software engineer who shows her how to run two of them safely.
What this video shows
Nora gives two agents two jobs on her booking app: a new invoice page and a fix for the reminder emails. Both work in the same folder, and by evening half of the invoice page is gone. Sam does not tell her to stop. He gives each agent its own copy of the code (a git worktree), its own part of the app and its own port on her laptop.
The second half is about bringing the work back. Both agents read the same rules file and end with a short report. Their changes go into the main code one at a time, and the second one is tested again after the first is in. Then Nora asks why not ten agents, and Sam explains why two is the right start. Which agent to pick for which job is in video 20, “Which coding agent should I use?”. The article has a map of the four ways agents clash, the commands and a two-agent checklist: read the article.
What you will learn
- Why two agents in one folder lose each other’s work, and what a git worktree is.
- How to split the work so each agent owns one part of the app, and who gets the shared files.
- Why the second change must be tested again after the first one is merged.
- Why two agents is a better start than ten.
Further reading
- Anthropic, Claude Code docs: “Run parallel sessions with worktrees” and “Orchestrate teams of Claude Code sessions”. worktrees and agent teams
- Git documentation: git-worktree. git-scm.com
- Anthropic Engineering, 5 February 2026: “Building a C compiler with a team of parallel Claudes”. anthropic.com
- Xu, Subramanian and Karthik, July 2026: “AI Agent Pull Requests on GitHub: Frequency, Structure, and Merge Conflict Rates”. arXiv 2607.04697
If your team wants agents that work side by side without stepping on each other, that is the kind of setup my team builds. Questions are welcome.
Transcript
0:03 Nora: Can I run several AI coding agents at once?
0:08 Sam: Yes. Start with two. Give each agent its own copy of the code, and its own part of the app. Then add their work back one at a time, after the tests pass.
0:20 Nora: Yesterday I tried it. One agent built my new invoice page. The other fixed the reminder emails. Both worked in the same folder. By evening, half the invoice page was gone.
Sam: They changed the same files. One wrote over the other.
0:36 Sam: So give each agent its own copy. Git can make a second folder of the same project. It is called a worktree. Your copy, and one for each agent, with one shared history. Claude Code, Codex and Cursor can make one for you.
0:55 Sam: Next, give each agent its own part of the app. The invoice agent works only in the invoice files. Files that everyone needs, like the package list, get one owner only.
1:08 Nora: And on my laptop? Both want to start the app.
Sam: Give each copy its own port, and its own test database. Then the two test runs never meet.
1:18 Sam: Both agents read the same rules file, so they make the same small choices. When an agent finishes, it writes a short report. What I did. The result. What is left.
1:31 Sam: Then bring the work back, one at a time. Agent A first. The tests pass, you read the change, and it goes into the main code. Then agent B updates to the new main code, and runs its tests again.
1:47 Nora: Why test the second one again?
Sam: Two changes can each work alone, and still break together. In one study, about one pair in five clashed.
1:57 Nora: Then why not ten agents?
Sam: You read every change, and that is the slow part. Each agent also uses your plan. When Anthropic gave sixteen agents one big problem, the extra agents did not help.
2:13 Nora: Today I tried again. The invoice page and the reminder emails are both done. Nothing is lost.
Sam: Good. Try a third agent when your reading keeps up.
2:23 Sam: Yes. Give each agent its own copy and its own part. Add the work back one at a time, after the tests. Start with two.
Have an app idea, a stuck app, or a daily job you want an AI agent to do?
Write three lines. I reply within one working day with a plain answer.


