Unit 03.04: Where each one fails first
Both processes fail. They fail in different places, and one of them fails considerably more expensively.
Quiet and cheap, or loud and expensive
Sequential's failures come from tasks running when they should not have, and from format drift between tasks. Hierarchical's come from the manager being wrong.
The code lists three failure modes for each.
FAILURES = {
"sequential": [
("an early task returns nothing", "later tasks summarise emptiness"),
("a task's output format drifts", "the next task misreads it silently"),
("one task is slow", "the whole run waits; nothing is parallel"),
],
"hierarchical": [
("the manager misroutes", "wrong agent's tokens spent, then a retry"),
("workers delegate to each other", "loops that only a hop limit stops"),
("the manager summarises wrongly", "a correct worker output is misreported"),
],
}
for process, rows in FAILURES.items():
print(f"{process}:")
for cause, effect in rows:
print(f" {cause:34} -> {effect}")
print()
# Sequential fails quietly and cheaply. Hierarchical fails expensively, because
# every failure mode above burns a manager call before it burns a worker call.
Sequential's worst case is a task summarising emptiness - wasteful, wrong, and cheap. The output is visibly thin, so it tends to be caught.
Hierarchical's failures each burn a manager call before they burn a worker call, and the delegation loop is unbounded without a hop limit. "Workers delegate to each other" is the one that produces a bill rather than a bad answer, and it is why allow_delegation=False is the right default on every agent that does not specifically need it.
The mistake this prevents
Running tasks in parallel introduces a third set of failures that belongs to neither process. Two tasks executing at once may both write the same field, and which write survives depends on which finished first - so the run is order-dependent in a way nothing in your source file shows. Parallelism is safe when tasks write disjoint fields and unsafe the moment they do not, so decide field ownership before enabling it, and treat any shared write as a bug rather than a race to be tuned.
The mistake is leaving allow_delegation=True because it is more capable. It permits every agent to hand work to every other agent, which is a complete graph of possible loops. Turn it on for the specific agent that needs it, if any.
Takeaway
Sequential fails quietly and cheaply; hierarchical fails expensively because every failure passes through a manager call. Default allow_delegation to False and turn it on deliberately.
