Part 2 of 11 · 2 min read
Latency is set by the longest dependency chain, not the sub-task count
Splitting work across agents only buys speed when the work was never going to wait on itself.
Think of a relay race versus a single runner doing eight laps alone. Splitting the laps across eight runners only saves time if they can run at the same time. It does not save time if each one has to wait for the baton from the last.
In plain words: a sub-task is a unit of work one agent can finish in a few steps. A dependency means one sub-task needs a result from another. A level is the length of the longest chain of dependencies. An edge is one dependency: one fact that must be handed over. Parallel workers can only finish as fast as the longest unavoidable chain. So latency tracks the number of levels, not the number of sub-tasks.
A worked example. Across 20 random 8-sub-task graphs, when dependency density is 0 (every sub-task independent, 1.0 levels, 0 edges), the split finishes in just 0.23 of the single agent's latency. That is real parallelism. At density 0.5 (5.2 levels, 9.4 edges on average), the split's latency ratio rises to 0.97, essentially a tie. At density 1.0, a full chain (8.0 levels, 18.0 edges), the split takes 1.46 times as long as the single agent. It is slower because every handoff between dependent sub-tasks adds a relay on top of the work itself.
The key lines. From code/mini-fanout/fanout.py:
# from code/mini-fanout/fanout.py
def levels(deps: list[list[int]]) -> int:
depth = []
for d in deps:
depth.append(1 + max((depth[i] for i in d), default=0))
return max(depth)
Read it as: each sub-task's depth is one more than the deepest of the sub-tasks it depends on. The graph's level count is the deepest depth anywhere in it. This single number is the entire latency story. However many agents you throw at a task, none of them can start before this longest chain ends.
Sub-task, dependency, level, edge
A sub-task is a unit of work that one agent can complete in a few steps. A dependency means sub-task B needs a result produced by sub-task A. A level is the length of the longest chain of dependencies. With all sub-tasks independent, there is one level. An edge is one dependency: one fact that must be handed over.
Example: "8 sub-tasks, 8.0 levels" describing a full chain is the structural fact that predicts the 1.46x latency result before a single token is counted. The level count alone tells you whether splitting can possibly help.