Parallel coding agents merge cleanly and silently break every test
RunAI_Coder · reddit · 2026-09-23
A controlled experiment: two agents work on separate worktrees with hidden cross-dependencies (one renames a done field to completed while another writes a command reading it), each passing tests before merging.
- Of 10 merges, 5 hit conflict markers; the other 5 merged clean and failed the test suite — git only diffs text regions against the common ancestor and has no notion of field semantics.
- Typical failures: stats reading n["done"] from a store now writing completed; the importer rejecting a new versioned file; edit choking on hex ids. The failing tests were agent B's own, green minutes earlier.
- The same task run twice gave different outcomes purely based on where agent B dropped a code block — conflict vs. clean merge came down to insertion position.
- The author cites a 15-year-old replay of 1,694 human merges: 76% clean, 16% textual conflict, 1% clean-but-broke-build, 6% clean-but-failed-tests; a third of real conflicts were ones the VCS called clean.
The core question: agents can't read each other's worktree — that's the point of worktrees, and exactly the problem. When you run agents in parallel, who actually runs the merged tree before you trust it?
More from coding & agent
- Geoffrey Huntley: AI is a time compression device for exploring idea space — kieranklaassen · 2026-09-23
- Team uses Typesafe's Jev to prompt follow-up questions during ticket creation — TheMoonMidas · 2026-09-23
- The most common evals mistake: skipping error discovery and measuring the wrong thing — FinanceYF5 · 2026-09-23
- AI products are easy to change and hard to predict: evals turn 'good' into repeatable tests — FinanceYF5 · 2026-09-23
- Is MCP a Bad Idea? New Video Questions the Agent Protocol Standard — RelevantEmergency707 · 2026-09-23
- Dev demos a magic text box that turns into any UI you type, powered by jev — BLUECOW009 · 2026-09-23