Planning and task decomposition in agent systems
How an agent splits a goal into subtasks — and when the split should stay fixed in code.

An agent that answers in a single call is a classifier, not an agent. As soon as a goal needs more than one action, something must choose them. Planning is choosing the steps a goal requires; task decomposition is cutting the goal into them.
The cut can live in two places: in code, written by the developer before the first token; or in the model, decided at run time as it works. Which one holds fixes how predictable the system is and how a mistake propagates. The mental model: a plan is the interface between a goal and the loop that executes it.
Two places a task can be split
Anthropic draws the line the same way: “Workflows are systems where LLMs and tools are orchestrated through predefined code paths,” while agents “are systems where LLMs dynamically direct their own processes and tool usage.” A split written into the code arrives under several names; the clearest is prompt chaining, which “decomposes a task into a sequence of steps, where each LLM call processes the output of the previous one” — the workflow for when “the task can be easily and cleanly decomposed into fixed subtasks.”
A split decided by the model looks similar and behaves differently. In orchestrator-workers “a central LLM dynamically breaks down tasks, delegates them to worker LLMs, and synthesizes their results”; the key property is that “subtasks aren’t pre-defined, but determined by the orchestrator based on the specific input.” The OpenAI agents guide reaches the same fork from the other end — “A workflow is a sequence of steps that must be executed to meet the user’s goal” — and distinguishes single-agent orchestration, one model running the loop, from multi-agent systems that coordinate specialized agents. A decomposition always exists; only its author differs.
The plan is revised while the agent runs
A plan written in code is executed; a plan held by the model is executed and edited. ReAct adds thoughts to the action space, including “decomposing task goals and create action plans” and “track progress and transit action plans” — the model breaks a question up first: “I need to search x, find y, then find z”. The payoff is the ability “to create, maintain, and adjust high-level plans for acting (reason to act), while also interact with the external environments … (act to reason)”. Because the loop returns evidence, the plan can be corrected mid-flight: “reasoning traces help the model induce, track, and update action plans as well as handle exceptions.” A decomposition that cannot be revised is a workflow; one revised at every step is the agent case.
Why a plan, and what it costs to skip one
The argument for decomposition is a controlled comparison. In ALFWorld a task “can have more than 50 locations and take an expert policy more than 50 steps to solve, thus challenging an agent to plan and track subgoals”, and the successful prompts carry thoughts that “(1) decompose the goal, (2) track subgoal completion, (3) determine the next subgoal”. The ablation is the point: “without any thoughts at all, Act fails to correctly decompose goals into smaller subgoals, or loses track of the current state of the environment.” A weaker pattern failed for the complementary reason, “due to a lack of highlevel goal decomposition.” Decomposition keeps the agent oriented; the loop still needs an anchor — “it’s crucial for the agents to gain "ground truth" from the environment at each step” — the environment, not the plan, is the authority on progress.
Limits and risks
- Errors compound. Autonomy brings “higher costs, and the potential for compounding errors”: every step is a place the model can be wrong, and a wrong subgoal is carried forward.
- More steps cost more. Splitting is not free: prompt chaining exists to “trade off latency for higher accuracy”, and more components “introduce additional complexity and overhead.” Anthropic recommends “finding the simplest solution possible, and only increasing complexity when needed”; the agents guide advises to “maximize a single agent’s capabilities first.”
- Not every goal should be decomposed. Agents fit “open-ended problems where it’s difficult or impossible to predict the required number of steps, and where you can’t hardcode a fixed path”; when the steps are known, a fixed path is cheaper and safer.
Fixed or dynamic: reading the choice
The decision follows from one question: can you name the steps before you see the input? If yes, write them as a code path: inspectable, testable, fixed for every input. If they depend on the input, the model must decompose — and then two concerns appear. It must be stoppable: stopping conditions such as “a maximum number of iterations” are common. And it should be visible: “Prioritize transparency by explicitly showing the agent’s planning steps.” How subtasks are handed on is a separate subject — delegation.
Level and prerequisites. L4 — agent systems are designed, not described, at this level: the reader must decide where a decomposition lives and say what follows from that choice. Prerequisites: the L4 sheets on chatbot, workflow and agent differences, and on the action loop and stopping conditions; the L2–L3 sheets on prompting and structured output.
Where to go next
- Automation & AI — the macro-area this sheet belongs to.
- Applications — the node this sheet sits in.
References
- Anthropic — Building effective agents — the workflow/agent distinction and the decomposition workflows (prompt chaining, orchestrator-workers).
- OpenAI — A practical guide to building agents — orchestration as single-agent or multi-agent systems, and the recommendation to start from a single agent.
- Yao et al. — ReAct: Synergizing Reasoning and Acting in Language Models — the thought space that decomposes goals, and the ablation evidence for planning.