cd /news/ai-agents/the-most-useful-thing-we-built-for-p… · home › topics › ai-agents › article
[ARTICLE · art-178354] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

The most useful thing we built for parallel agents doesn't touch their context. It merges their branches before they do.

A developer built a "shadow merger" that continuously merges every open agent branch in a project using local git and detects file- and function-level collisions before agents attempt to merge. When a new commit lands, affected worktrees receive a one-line notice the next time their agent runs a command or edits a file, without blocking the agent. The team reports its "problems caught before merge" metric went from zero to 79 in the first week after the tool shipped.

recommendation

Merge all open agent branches in the background on each commit and surface file-level collision notices to agents before they merge, rather than adding more context.

more in playbook: Working with AI coding agents
by read2 min views8 publishedNov 30, 2026

A short update from the series on evidence-based agentic development.

I run a lot of agents at once: several issues in flight, each in its own worktree, across six repositories, in more than one runtime, sometimes on more than one machine. Each agent sees only its own branch. They find out they collided when the second one tries to merge, or worse, after it has.

So we built a shadow merger. Whenever any agent's branch gets a new commit, it merges every open branch in the project together in the background, with local git only, and works out what collides: which files, which functions. When something changes, it queues a one-line notice for each affected worktree. The next time the agent there runs a command or edits a file, it gets the notice first:

your branch and #489 both change kandiforge-com/lib/search/docsSearchData.ts

It never blocks. It tells the agent while it can still do something about it.

Two more things ride on the same hook:

fatal: ambiguous argument 'origin/development' 3 minutes ago." The count we keep is problems caught before merge: the shadow merger's notices plus the code watcher's findings on unmerged commits. Every week before these shipped, it was zero, because nothing looked. In the first week: 79. In mid-October it was tracking live overlaps such as two open branches in the same auth server file in one of our projects. Both agents already knew.

This is the opposite of what I expected a year ago. We spent most of our effort putting more knowledge into agents' context, and agents mostly ignored it. What works is watching the actual code and the actual work, and saying one specific, true thing at the moment it matters.

The outcome side, whether fixes after merge fall now that collisions are caught before, is still open: What survived has where it stands.

This is one of the write-ups behind my talk at Build Stuff in Vilnius this December, the 15th edition, under the theme The Age of Agency.

Control Your Fate at the Metal

Wednesday 2 December, 15:00, Zeta 2. 45 minutes.

If you're coming, say hello. If you're not yet, `2026SPEAKER_20` takes 20% off a ticket.

#BuildStuff15 #buildstuffconf #AgeOfAgency @buildstuffconf [https://buildstuff.events](https://buildstuff.events)
── more in #ai-agents 4 stories · sorted by recency
── more on @build stuff 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/the-most-useful-thin…] indexed:0 read:2min 2026-11-30 · —