running multiple coding agents in parallel broke in ways i didn't expect. the three that actually bit me

Reddit r/AI_Agents News

Summary

The article discusses three unexpected problems when running multiple coding agents in parallel: conflicts over shared working tree, runtime collisions (database, ports), and difficulty detecting stuck agents. Solutions include using per-agent git worktrees, isolated runtimes, and monitoring remaining gap metrics.

i started running two or three coding agents at once thinking the only problem would be cost. the real problems were all about shared state, and none of them showed up until something was already broken. first one: they fight over the same working tree. two agents editing files in one repo and you get diffs neither of them really made, changes half overwritten. the fix that finally worked was a git worktree per agent, so each session's diff means something again and they physically can't touch each other's files. second: worktrees fix the git side but not the runtime. each agent gets its own branch and they still share one dev db, one port range, one node_modules. i had two race a migration once and the second just clobbered the first's schema change, and none of that shows up in a diff because the code was clean. isolating the runtime per agent, its own db and ports, was the part i skipped and paid for. third, and the sneakiest: telling when an agent is stuck versus just slow. an exit code only says it ran or it didn't, so a crash and a real objection look identical downstream. and a looping agent keeps a nonzero state delta every step, so nothing trips even while it goes in circles. what worked was fingerprinting the remaining gap, which tests are still red, which fields still empty, instead of the action, and flagging when the same gap fingerprint comes back after a few steps. none of these were the model being dumb. they were plumbing. curious how everyone else is handling the isolation, one container per agent, or something lighter?
Original Article

Similar Articles

I measured why I can't run more than 3 parallel agents in Claude Code

Reddit r/AI_Agents

An analysis of why running more than three parallel agents in Claude Code hits a bottleneck, revealing a duty-cycle problem where the developer becomes the primary latency source, and the 'join' process of merging parallel outputs is the biggest time cost.