AI software factory
How to run multiple AI coding agents in parallel without breaking your codebase
Short answer
Give every agent its own copy of the code (a git worktree or its own cloud computer), its own branch and one clearly scoped task from a shared board. Then add an independent review step before anything merges. Isolation stops collisions, and the board stops two agents doing the same job.
The first time you run two coding agents at once, it feels like a cheat code. The second time, they edit the same file, one overwrites the other, and you spend an hour finding a bug neither of them created. Running agents in parallel is easy to start and easy to get wrong. The fix is not a better model. It is isolation and clear tasks.
Why parallel runs collide
The failure is shared state. If two agents work in the same folder, they change the same files and the same running processes. You get a build that neither agent broke on its own.
Parallel agents need three kinds of separation:
- Files. Each agent edits its own copy.
- Scope. Each agent has a different task, not two versions of the same one.
- Environment. If agents run the app, they need their own ports, data and installed packages too.
Step 1: Give each agent its own copy of the code
On one machine, the standard tool is a git worktree: a separate checkout on its own branch that shares the same repository history. Claude Code supports this directly. Its docs show claude --worktree feature-auth, and running the same command with another name in a second terminal starts an isolated parallel session. The worktrees page also notes that worktrees isolate file edits, while subagents split work inside one session.
Worktrees do not isolate databases, running dev servers or ports. When agents need to actually run the app, give each one its own machine. Codex Cloud does this on OpenAI-managed computers, with each task in its own isolated workspace. Devin runs in cloud virtual machines, and in Tomi's setup every sub agent gets its own cloud computer. More on that in giving agents their own computer.
Step 2: Hand out one task per agent from a board
Do not prompt each agent from your head. Keep a task board and assign tickets from it. A good ticket has:
- One outcome you can check.
- What to test.
- Existing patterns and constraints the agent should follow.
- The area of the code it may touch.
Devin's docs say the same thing in their own words: it works best when it can verify success objectively, such as CI passing, unit tests running or a user flow tested in the browser. Its use-case guide also says to break big projects into isolated, repetitive subtasks and run them in parallel.
Step 3: Pick how you coordinate
Claude Code lists five ways to run work in parallel: subagents, agent view, agent teams, dynamic workflows and projects. They differ in how involved you stay. Agent teams, for example, are multiple coordinated sessions with a shared task list and messaging, managed by a lead.
The rule of thumb: the less you want to steer each conversation, the more you need a lead role that does it for you.
How we do it at SupaKid Studios
Tomi does not prompt each coding agent. He runs a layered setup. A personal agent delegates to a PM for each project, each PM works with an engineering manager, and the engineering manager sends down sub agents with defined tasks. In his stack, the engineering managers are long-lived agents that work through long tasks and direct a crew of threads. Every sub agent has its own cloud computer.
The managers wake up every 30 minutes, look at the task board and send sub agents down with a defined task. When a sub agent merges its code, it is archived and the next one picks up the next ticket. Tomi says he merges hundreds of pull requests a week this way, well over a thousand a month.
Two things keep it from turning into chaos. Tasks are small and verifiable. And the code gets reviewed by a different agent than the one that wrote it. See AI code review and testing agents.
A starter setup you can run today
- Pick two tickets that touch different parts of the code.
- Start each agent in its own worktree or cloud workspace.
- Tell each agent exactly how to prove it is done.
- Have each open a pull request instead of pushing to main.
- Review one at a time. Merge the first, then rebase the second.
What goes wrong
- Overlapping tickets. Two agents fix the same bug in different ways. Split by area, not by vague theme.
- Merge pile-ups. Ten open pull requests all touching one file. Merge small and often.
- Shared test data. Two agents run tests against one database and fail each other's runs.
- Review as the bottleneck. If you cannot review it, do not start it. Add a review agent before adding agent number five.
If you want the big picture first, read what an AI software factory is.
Get it running for your product
Getting parallel agents set up is mostly plumbing and habits, and that is what a managed AI agent team from SupaKid Studios takes off your plate. If you want to talk through your repo and where to start, book a 30-minute call.
Questions people ask
Can two agents edit the same repo at once?
Yes, if each has its own checkout and branch. Two agents in one working folder overwrite each other's edits.
How many agents can I run at once?
The practical limit is how fast you can review the output, not how many your machine can start. Start with two or three.
Do I need git worktrees?
On one machine they are the simplest option. Cloud agents get their own isolated workspace without worktrees.
What should each agent get as a task?
One outcome that can be checked, with a clear list of what to test and what files or areas are in scope.
Keep reading
- What is an AI software factory? A plain-English guide from someone who runs oneWhat is an AI software factory?
- How to give AI agents their own computer (cloud VMs and computer use)How do I give an AI agent its own computer?
- How to stop babysitting your AI coding agentsHow do I stop babysitting my AI coding agents?
- How to structure an AI engineering team: chief of staff, PMs, engineering managers and agentsHow do I structure an AI engineering team?