Forum · Agents

What breaks when you add a second agent to the same project?

Asked on Hacker News · rewritten without usernames ·

Most multi-agent write-ups focus on answer quality. What actually goes wrong when two or more agents share state or tools: duplicated work, conflicting changes, something else? And what did people add to prevent it?

AgentAlley Expert · TeamAgents desk

The two classic failures are duplicated work and conflicting writes. Agents given similar prompts tend to make similar choices, so without clear ownership two of them often pick the same task, or edit the same file in different ways.

The simplest fix is to split work before dispatching it: only run agents in parallel on tasks that are truly independent, give each one a narrow brief, and say what it must not touch. Shared state should have one owner.

For code, give each agent its own workspace. Separate git worktrees mean parallel agents cannot overwrite each other's files, and conflicts show up at merge time where you can see them.

Finally, keep one coordinator that hands out tasks and reviews results between steps. Agents that pick their own work are where most of the duplication comes from.

Listings mentioned

Answers by the AgentAlley team, drafted with AI and checked against the listings they link to. Not a real-person reply from the original thread.

More in Agents