Why it matters
A single agent is often limited by wall-clock time rather than by model capability, so running several tasks at once looks like free throughput. The costs arrive later: duplicated discovery, semantic merge conflicts and a review queue that no longer matches the arrival rate. The engineering question is where the tasks are actually independent, which is usually at module and interface boundaries rather than at the level of the feature request.
Mental model
It is adding lanes to a road: throughput rises until the exits merge. The metaphor breaks because code lanes converge on the same files, and the merge has no traffic light, so speed gained upstream is spent again in conflict resolution.
How it works
- 6
- 2
- 2
- 2
Step 1 of 8
Find the independence boundary
The cut is at the module and the interface, not at the feature request. Six files, two per task, and the only thing the tasks share is a type that lands first.
root · current
Release · 3 tasks, one base commit
Every task starts from the same commit, so the base is shared and the diff is not. Six files are touched in total, two per task, and no file is edited by two tasks: the shared type is a dependency that lands first, not a contested file.
Root of the hierarchy · 6 counted
Also in focus
- Serial · shared type
- Task A · pricing
- Task B · invoicing
Figure. A release partitioned at module and interface boundaries: three worktrees over six files, a serial task that lands the shared type, and a combined-branch build before any review opens. The crossed branches are the cuts that look parallel and are not, a split by feature request and parallel discovery.
What to notice. The tasks, the file counts and the shared type are an authored example; the page publishes no measurements, so the counts describe a partition and not throughput. The merge is the mechanism: worktrees isolate files, and the combined build is what catches an interface two passing branches disagree about. Omitted: host provisioning and review tooling, which the page treats as operations.
Text version
A parallel work plan drawn as a tree with file counts. The root is a release of three tasks from one base commit, six files in total, with one shared type. Three task branches hang from it, two files each, and their counts sum to six. The serial task lands types/billing.ts and its barrel first, with a check that both branches rebase on it. Task A changes pricing with a check that its tests pass alone, and Task B changes invoicing with the same check. A combiner branch is the merged branch, running the build and all three tests, with a gate that orders the merge by dependency, type first. A note caps open patches by reviewer capacity. Three branches are rejected and crossed: split by feature request with four files and two hit twice, parallel discovery that finds the same bug twice, and fan-out by compute with ten branches and one reviewer. A note says to diff branch file lists before review, and another says to start at two or three concurrent tasks.
- Partition work by module or feature boundary and write down the interface each task may touch.
- Give each task its own worktree and branch from the same base commit.
- Assign one owner per shared file and route cross-cutting changes through a serial task.
- Run a fast integration build on a combined branch before opening individual reviews.
- Order the merge by dependency rather than by which task finished first.
- Track time saved against time spent resolving conflicts and re-running tests.
Trade-offs
| Choice | Good for | Cost | Fails when |
|---|---|---|---|
| Two or three parallel tasks | Modest speedup, manageable merges | Coordination overhead | Tasks touch the same modules |
| Many parallel tasks | High throughput on mechanical work | Merge conflicts, review bottleneck | Change is architectural |
| Parallel discovery, serial implementation | Avoids duplicate exploration | Slower to a first patch | Repository is unfamiliar |
| Serial with a queue | Simple and predictable | Wall-clock cost | Deadline is tight and tasks are independent |
Good for
Modest speedup, manageable merges
Cost
Coordination overhead
Fails when
Tasks touch the same modules
- Tasks touch the same modules
- Change is architectural
- Repository is unfamiliar
- Deadline is tight and tasks are independent
Figure. Each choice with what it buys, what it costs, and the case where it loses.
What to notice. The fourth column is the decision: if the losing case describes your situation, the choice is wrong.
Text version
Four trade-offs: Two or three parallel tasks is good for Modest speedup, manageable merges, costs Coordination overhead, and fails when Tasks touch the same modules. Many parallel tasks is good for High throughput on mechanical work, costs Merge conflicts, review bottleneck, and fails when Change is architectural. Parallel discovery, serial implementation is good for Avoids duplicate exploration, costs Slower to a first patch, and fails when Repository is unfamiliar. Serial with a queue is good for Simple and predictable, costs Wall-clock cost, and fails when Deadline is tight and tasks are independent
Failure modes
- Duplicate fix. Two branches implement the same helper under different names. Debug: diff branch file lists before review and look for overlapping new symbols.
- Semantic conflict. Both branches pass alone and the combined build fails on a changed signature. Debug: build the integration branch, not just each branch.
- Review starvation. Twenty patches queue for one reviewer and the queue becomes the bottleneck. Debug: measure review wait time against agent run time.
In production
Monitor concurrent tasks per host, merge conflict rate and review queue depth. Cap concurrency by reviewer capacity rather than by available compute.
Common misconceptions
People think: Parallel agents multiply throughput linearly.
Actually: Merging, review and duplicated discovery consume the gain, often before the third task.
People think: Worktrees make parallel work safe.
Actually: They isolate files, not interfaces or review attention.
Interview angle
Start from the independence boundary, not the compute budget. A strong answer names the integration check and treats review capacity as the real limit. Proposing many concurrent agents, with no plan for merging or duplicated discovery, is the weak response.
Sources
- Git, git-worktree documentation — isolated checkouts for concurrent tasks.
- Anthropic, How we built our multi-agent research system — coordination costs in multi-agent systems.
- Anthropic, Effective harnesses for long-running agents — workspace and state management across parallel work.