A long task given to one agent in one go fails as a whole: one bad step poisons the rest, and the retry repeats everything. Split it instead, into subtasks with one deliverable each, and run them in a fixed order. ADK’s workflow agents do this by design, running sub-agents in order with state between stages, and CrewAI’s guidance is the same: start with a Flow that owns the order and run a crew inside one of its steps. A subtask should be small enough that you can say whether it passed, and independent enough that its failure does not sink the others.
What you need
- A long task that has failed as a whole at least once
- A list of its natural stages, each with one deliverable
- A way to run the stages in order, such as a Flow or a workflow agent
Step 1: Break the task at its natural joints
List the stages where one deliverable ends and the next begins, and make each stage a subtask with its own deliverable and done condition. If a stage has two deliverables, split it again.
Step 2: Run the subtasks in a fixed order
Wire the subtasks to run in order, with each one reading the previous subtask’s deliverable from state. Do not let the agents choose the order themselves.
Step 3: Test a failure in one subtask
Break one subtask on purpose, for example with a bad input, and confirm only that subtask fails while the others keep their results. Re-run just the failed subtask and confirm the whole task completes.
Worked example: synthetic split task
The table below is a synthetic example. It shows the expected result of splitting the task; no agent was run.
| Subtask | Deliverable | Failed run loses |
|---|---|---|
| Research | Fact list | Only research |
| Draft | Draft text | Only draft |
| Review | Final text | Only review |
| Re-run after one failure | Whole task completes | Pass |
Expected result (UNTESTED). each subtask has one deliverable, a failure loses only that subtask, and re-running it completes the whole task. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- Splitting adds coordination, so do not split a task that fits in one step.
- A subtask that is too small costs more in handoffs than it saves in retries.
- The order must be fixed in code, not left to the agents to decide.
- Each subtask’s deliverable must be checked before the next one starts, or errors carry forward.
