Skip to main content
AI AUTOMATION

Six coding agents at once, no two share a file

One git worktree per issue, one terminal tab per worktree, and a file-overlap check before anything launches.

THE PROBLEM

What was in the way

Running several coding agents at once sounds like free throughput. In practice they share one checkout, so two of them editing the same working tree overwrite each other mid-run.

Separate branches only move the collision later. When two issues touch the same file, the conflict surfaces at merge, after both agents have finished and neither can say which half was right.

THE APPROACH

How it was built

Isolation is the whole design. Issues are not picked by priority, they are picked by file overlap. The tool reads each open issue body, builds an overlap matrix over the files each one claims, and takes the largest set of at most six where no two issues share a file.

Each surviving issue then gets its own git worktree and its own branch, so no two agents write into the same directory. Each agent's opening brief also carries a negative scope, the union of the other selected issues' files, marked off limits. Sessions run as visible terminal tabs rather than headless jobs, so the operator can watch and steer any one of them.

Issue selection to merged PR
Issue selection to merged PR
HIGHLIGHTS

How it works

Issues are picked by file overlap

Selection runs as a conflict check over the issue bodies. If two candidates claim the same file, one is dropped and the conflicting pair is printed for the operator to settle.

Every brief says what not to touch

Each agent receives the union of the other worktrees' files as an explicit off-limits list, so the negative scope travels with the work instead of living in the operator's head.

A supervisor tab runs the review pass

One extra tab polls every fifteen seconds. When a worker's pull request opens, it spawns a fresh review session for that branch, then queues a squash merge.

RESULTS

What it does now

six sessions, hard cappedthe spawn refuses a seventh worker
no shared working treeone git worktree and branch per issue
resumes a partial spawnonly the tabs that died relaunch
STACK

What it is built on

PowerShell 7spawn and supervisor scripts
git worktreeper-issue isolation
GitHub CLIissues, PRs, merge
Claude Codethe agent in each tab
Windows Terminalone tab per worker
WMI Win32_Processtab liveness checks

Got something in your workflow that looks like this?