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.
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