Parallel agents
Running several coding agents at the same time on separate tasks, each with its own branch and working copy so their edits cannot collide. It moves the bottleneck off any single agent's speed and onto the human's ability to review what comes back.
At a glance
- Isolation
- One branch and working copy per task
- Lightest option
- git worktree
- Heavier option
- Containers or remote sandboxes
- Real bottleneck
- Human review capacity
- Not the same as
- Subagents
How it works
Two agents editing the same checkout will overwrite each other's files and break each other's builds. The usual fix is a git worktree per task: one repository, several working directories, each on its own branch. Each agent runs in its own directory with its own dev server port, and its changes stay on its branch until someone merges them. Containers and remote sandboxes are the heavier version of the same idea, useful when tasks need separate databases or system packages.
The best candidates are independent tasks: a bug fix in billing, a new settings field, a test for a parser. Tasks that depend on each other need to run in order, and tasks that edit the same files will collide at merge time even if they never collided while running.
Why it matters
Running five agents does not make you five times faster if you read every diff as slowly as before. What changes is where your time goes: less waiting, more reviewing. That rewards tasks that are small and well specified, agents that run tests before reporting, and a habit of sending weak work back with clear feedback rather than fixing it by hand.
It also changes how you write tasks. A task you hand to an agent and then leave needs to carry its own context: the goal, the files involved and the check for done. A vague task that would have been clarified in conversation instead comes back as a confident diff solving the wrong problem, and you only find out at review.
Parallel agents versus subagents
Parallel agents are independent sessions, each owning a whole task and its own branch, usually directed by a person. Subagents are helpers spawned by one agent inside its own session to do a side job, such as searching the codebase, and report back. Subagents split one task; parallel agents run many tasks.
Example
git worktree add -b fix/login-timeout ../app-fix-login
git worktree add -b feat/settings-field ../app-settings
git worktree listCommon mistakes
- Running two agents in the same checkout, so their edits and builds collide.
- Splitting work into tasks that touch the same files, which trades waiting for merge conflicts.
- Sharing one local database or fixed port across worktrees, so isolated agents still interfere.
In Fredrin
Every ticket you run in Fredrin gets its own branch, git worktree and agent session, and your own computer runs as many at once as you start.
Running a ticketRelated terms
Frequently asked questions
How many agents can I run in parallel?
As many as your machine, your usage limits and your review capacity allow. In practice the limit is how many finished diffs you can read carefully, not how many sessions you can open.
Do I need git worktrees to run parallel agents?
You need some form of isolation, and worktrees are the lightest one. Separate clones or containers also work but cost more disk and setup.