Research note
Recursion in agent delegation
Depth, fan-out and budgets that shrink.
Delegation is recursion. A primary agent splits a question into parts and hands each to a sub-agent; a sub-agent may split again. Results flow back up and are merged. It is the same rule applied at every level, which is why the structure looks like a branching plant or a fractal more than an org chart. This note looks at delegation through that lens: what depth and fan-out do, how errors compound, and when a run should stop splitting and just do the work.
The shape of a run
A delegation tree has two numbers that matter most: depth (how many levels of splitting) and fan-out (how many children per split). Together they set how many agents run. With fan-out f and depth d, a full tree has on the order of f to the power d leaves. That grows quickly, and every leaf costs tokens and tool calls.
In practice the trees we see are far from full. A root question like “why did scrap rise on Line B this month?” splits into three or four lines of enquiry; one of those splits again; the rest are answered directly. Most useful runs are shallow and uneven, deep only where the question is genuinely nested.
Errors compound downward and upward
Every split is a chance to lose the question. The parent writes a brief for each child; if the brief drops a constraint (the date range, the line, the definition of scrap) the child solves a different problem, correctly. The error is invisible at the child and only shows up when the parent merges.
The arithmetic is unforgiving. If each hand-off keeps the intent with probability p, a leaf at depth d receives the intended question with probability p to the power d. At p of 0.95, three levels down that is about 0.86; five levels down it is about 0.77.11A toy model: hand-offs treated as independent. Real failures cluster, which can be better or worse. The point is the shape, not the numbers. Errors also compound on the way up. A merge that summarises children’s results without their evidence turns uncertain findings into confident sentences.
Cascades
Complex systems research has a useful picture for what happens when a deep tree goes wrong. In a sandpile model, grains are added one at a time; most additions do nothing, a few trigger small slides, and rarely one triggers an avalanche across the whole pile. The size distribution of those avalanches follows a power law.22Bak, Tang and Wiesenfeld, 1987, on self-organised criticality.
Delegation trees without limits behave a little like that. Most sub-tasks complete. Occasionally a child decides its part needs splitting, its children decide the same, and one branch consumes most of the run’s budget exploring a corner of the question nobody asked about. We do not claim runs are literally critical systems. The analogy is useful because it says the fix is structural: you cannot prevent cascades by making each agent a bit more careful, you prevent them with budgets that bound how far any one can spread.
Budgets and stopping rules
Each delegation carries a budget: remaining depth, a token share and a fan-out cap. Children split their parent’s budget rather than receiving a fresh one, so the total for a run is fixed at the root.
delegate(task, budget):
if budget.depth == 0 or task.estimated_steps <= 3:
return solve_directly(task) # leaf: do the work
parts = plan(task, max_parts = budget.fanout)
results = [delegate(p, budget.child()) for p in parts]
return merge(results, keep_sources = True)
budget.child():
depth - 1
tokens * share(part) # children split the parent's budget
fanout min(fanout, 4)The stopping rule matters as much as the budget. An agent solves a task directly when its depth budget is spent or when its own estimate says the task is a few steps. That second condition is where most of the gains came from. Agents that were allowed to delegate tended to, even for work they could have done in three tool calls, and each unnecessary split added a hand-off that could lose the question.
We also learned to stop early on the way up. If two children return contradictory findings with comparable support, the parent does not delegate a tiebreaker automatically; it reports both and asks the owner. A run that recurses to settle its own disagreements is a run that will eventually settle one wrongly.
The same rule at every depth. With a budget that only gets smaller.
What we observe
Across reviewed investigations, runs with a depth limit of two and a fan-out cap of four were as accurate as unlimited runs and used markedly less budget. Raising depth to three helped on a small set of questions with genuinely nested structure, such as multi-plant comparisons where each plant needs its own sub-investigation. Beyond that, deeper trees mostly added hand-offs.
The visible benefit to reviewers was not speed. It was that a shallow tree with sources on every merge is easy to read: you can open the root answer, see which child produced each claim, and open that child’s tool calls. Recursion is a good way to organise work. It is only a good way to organise evidence if every return keeps its sources.