When an engineering goal exceeds a single Agent's context capacity and processing power, we need a way of collaborating that breaks "one big problem" down into "a set of deliverable smaller problems."Engineering Patterns for Multi-Agent Collaboration and Recursive Task Decompositionis exactly such an organizational method: upper-level executors grasp the overall goal and carry out the decomposition, while lower-level executors complete local implementation and testing within clearly defined boundaries. When a subtask is still too complex, recursive decomposition continues downward until every unit of work is executable and verifiable.
Three-Tier Structure: Understanding, Recursion, and Local Closure
- Upper-level executors: oriented toward the overall goal, they answer "what needs to be done" and output delegable subtasks, constraints, and acceptance criteria.
- Mid-level executors: they take on subtasks that are still too large, continue recursive decomposition, and converge a loose big goal into a stable task hierarchy.
- Lower-level executors: they complete local implementation and testing within their responsibility boundaries, produce verifiable results, deliver them upward, and form a local closure.
Why Recursive Decomposition Is Necessary
An Agent's context window, callable tools, and the scale of tasks it can handle in a single pass are all limited. If a single Agent were to hold the full context of an entire project over the long term, not only would costs rise with scale, but goal drift, state contamination, and dilution of key information would also become likely. Recursive decomposition distributes this pressure across the tiers: each Agent only needs to grasp the goals and constraints of its own tier, complex goals are reduced layer by layer into executable, deliverable units of work, and overall consistency is guaranteed by the task hierarchy.
Key Mechanism: Task Tree and Handoff Relationships
Parent tasks and subtasks form a recursive task tree. Flowing downward istask delegation— goals, boundary constraints, and acceptance criteria; flowing upward isResult Collection— outputs, verification evidence, and unresolved issues. Whether collaboration truly holds depends on three things: whether the task hierarchy is clear, whether responsibility boundaries are mutually exclusive, and whether handoff artifacts (interface definitions, datasets, test cases, checkpoints) are explicitly agreed upon. If any one of these is missing, multiple Agents will degenerate into duplicated effort and mutually conflicting results.
An Echo of "Method Evolution"
The object of recursive decomposition is not only the task itself: the depth of decomposition, the granularity of delegation, and the result-collection strategy can likewise be continuously evaluated and adjusted. When task feedback (such as a subtask being repeatedly reworked) in turn affects how the next decomposition is done, this collaborative process itself enters a self-improvement loop—consistent with the idea of bringing "the method that generates candidates" into the scope of optimization.
