Hierarchical Task Decomposition
Break a complex goal into a hierarchy of sub-tasks that individually fit within the agent's reliable reasoning horizon.
This page is the complete instruction page for one pattern called "Hierarchical Task Decomposition." It explains the problem this pattern solves, the idea behind the solution, when you should (and should not) use it, and what happens afterward, both the good effects and the costs.
This matters because building AI agents is not just about making them clever. It is also about making them safe and predictable. Following a well-tested pattern like this one helps avoid common mistakes, and shows you exactly which safety rules and regulations it connects to, listed under "Standards Mesh" on this page.
Context
Agents are unreliable at tasks that span many dependencies. Performance degrades sharply past 5–7 reasoning steps without structure.
Problem
Flat reasoning on large tasks produces shallow, brittle plans.
Forces
- Depth of decomposition vs coordination cost
- Static plan vs adaptive refinement
Solution
Decompose the top-level goal into a tree of sub-goals, each with a measurable completion criterion. Execute leaf sub-goals; propagate results upward. Re-decompose only sub-trees that fail.
Where this pattern acts in the two lifecycles
02 Reason / Plan. Interpret goal, decompose, select strategy. 13 of 61 catalogue patterns act at this stage.
02 Build & Integrate. Model selection, tool wiring, memory design. 17 of 61 catalogue patterns act at this stage.
Stages and counts from the catalogue data. The Runtime lens is the loop the agent runs each turn; the AgentOps lens is the lifecycle the team runs the agent through. See the Matrix for every pattern at each stage.
Applicability
- Complex workflows
- Research agents
- Incident response agents
- Anything beyond ~10 steps
Anti-Patterns
- One monolithic "do everything" prompt
- Decomposition so deep coordination dominates real work
Consequences
- +Reliability at scale
- +Partial-success recovery
- −Planning overhead
- −Bad top-level decomposition still fails
