How to Split Work Across Subagents Without Conflicting Results
Split a task across three helper agents and each one quietly makes its own choices about ids, dates and names. Two helpers that agree nine times in ten still clash often. The fix is to write the shared choices into each
Split a task across three helper agents and each one quietly makes its own choices about ids, dates and names. Two helpers that agree nine times in ten still clash often. The fix is to write the shared choices into each helper's instructions, then check what comes back.
Engineer's view. This is two teams building against an API spec that never said the date format. Each subagent is a team that sees only the spec its lead agent wrote. Any choice the spec leaves open gets made twice, once per team. You find out at integration, when the merged code does not fit together.
TL;DR. A subagent task brief has to fix every choice that two subtasks share, because each subagent sees only its own brief. Helpers that usually agree on a choice still clash often once you run several, so the brief states the value and the lead checks what comes back.
Explain Like I'm 5
Three friends are making one birthday card. One draws the picture, one writes the poem, and one picks the envelope. Each works in a different room.
You tell them the card is for Grandma. You forget to say what color.
The picture comes back blue. The poem talks about red roses. The envelope is green.
Nobody did anything wrong. Each friend picked a color alone, because nobody told them. Next time, you say "the card is red" before anyone leaves the room. Then you check the pieces when they come back.
The Problem
You have shipped this bug before, and it had nothing to do with AI.
Two teams built a feature in parallel. The backend team wrote the endpoint. The mobile team wrote the client. The spec said "return the order with its creation time." It did not say how.
The backend sent epoch seconds. The client parsed ISO-8601 strings. Both teams passed their own tests. Integration day broke. The fix was a contract written before anyone started: the field, its type and its format.
Splitting an agent's task across subagents is that bug, run on every request. A subagent is a helper agent the main agent starts to do one piece of work. It never sees the main agent's conversation. It sees only the instructions the main agent writes for it. Any choice those instructions leave open, each helper makes alone.
Asking the helpers to "be consistent" does not help. Each one is consistent with its own defaults. Two helpers that would each pick the same id format 90% of the time still disagree almost one time in five. With five helpers, it is four times in ten.
Anthropic hit a milder version in its research system. Its lead agent once handed out "research the semiconductor shortage" with no division of labor. Two helpers duplicated the same work.
The fix: before you split the work, list every choice two subtasks share, and write its value into every subagent task brief. Then have each subagent report the choices it made alone, and compare those reports when the results come back.
Read the full post on The AI Commit
How to Split Work Across Subagents Without Conflicting Results carries the rest: the fix and why it works, the code to change for each role, how to tell it worked, when it is the wrong tool, and an interactive model you can play with.
Originally published at theaicommit.com, a daily AI engineering lab for software engineers. The original has an interactive version you can play with, and the full runnable code is on GitHub.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.