Urgent.News

What's breaking now, across hundreds of outlets.

AI

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

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 .…

Our most useful development for parallel agents comes not from merging their context, but rather from merging their branches. In my work, I run numerous agents simultaneously on various issues, each operating within its own worktree across multiple repositories and runtimes. The agents become aware of a collision only after attempting to merge or, even worse, after the merge has already occurred.

To address this problem, we developed a shadow merger that operates in the background. Whenever an agent's branch receives a new commit, the shadow merger merges all open branches in the project using local git, identifying which files and functions collide. Whenever a change occurs, the shadow merger sends out a one-line notice to each affected worktree, allowing the agent to address the issue before it becomes problematic.

This mechanism also facilitates failure relay, where an agent encountering a specific failure informs other agents about it within minutes. This enables agents to learn from each other's experiences as they work, rather than only learning after a merge failure. Additionally, the system provides live overlap information, allowing agents to know when another live session in any runtime is working in the same area.

By tracking the problems caught before merging, we found that the shadow merger's notices and the code watcher's findings on unmerged commits led to zero issues before their implementation. In the first week after implementation, the system caught 79 problems. This approach contrasts with my initial expectations, where adding more knowledge to agents' context largely went unnoticed.

The key to successful agent development, it seems, is focusing on watching the actual code and work, and delivering specific, relevant information at the right moment. The outcome of this approach, such as the success of fixes post-merge, remains to be seen. I will be discussing this topic at Build Stuff 2026, a conference held in Vilnius on December 15th, 2026, titled "The Age of Agency."

The event will take place on Wednesday at 2 PM in Zeta 2, and will last for 45 minutes. Attendees are encouraged to engage with the speaker, and there is a special offer of 20% off tickets for those who mention "AgeOfAgency."

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in AI

The future is easier to see than tomorrow: A year-end reflection on geopolitics, AI and the need to think deeply

As 2026 draws to a close, one thing has become increasingly clear: geopolitics is no longer background noise. It is directly shaping the economy, influencing supply chains, capital flows, market…

  • Geopolitics directly impacts economy, supply chains, and business opportunities
  • Four key questions to analyze major news and geopolitical developments
  • AI's impact on economy extends to physical production and industrial operations

More from Monday, 30 November 2026 →