Controlled Experiments on Recursive Delegation in Coding Agents
Jerry Li, sole author. Accepted at two NeurIPS 2026 workshops in Sydney: Who Verifies the Agents? Toward Reliable Agent Development, and Managing Agents that Manage Agents.
The question
A coding agent can do a task itself, or spawn other agents, hand them pieces, and merge what comes back. Does a tree of agents that costs several times as much deliver more correct work?
The experiment
Two campaigns on DeepSWE: repository repairs from public GitHub projects in five languages, 97 of 113 tasks gradable. A fix counts only if an external verifier passes every failing test and breaks none. Every comparison is between arms on the same task, with one model (gpt-5.6-luna), fixed prompts, tools and per-agent turn budget, and a 6,000,000-token cap that never bound. Run order is randomised; intervals are bootstrapped over repositories.
The depth campaign varies the tree: one agent, then balanced trees of 3, 7 and 15. The return campaign fixes it at seven and changes only what workers hand back.
Fig. 1Trees cost 3 to 12 times more, with no resolved gainDeepSWE 97 gradable tasks
One row per arm of the depth campaign: one agent, then balanced trees of 3, 7 and 15. Bars are tokens relative to one
agent; the thin line is wall-clock time. Dots are the paired change in verified success with 95% intervals, each on its
own paired tasks. No tree resolves a gain; the 3-agent tree resolves a loss.
1. Trees cost more, with no resolved gain
Trees of 7 and 15 agents spent 5.98 and 12.50 times the tokens of one agent. Verified success did not follow: −4.00 points (95% interval −15.09 to +8.00) at 7 agents and −6.03 (−16.96 to +5.56) at 15, and the 3-agent tree was resolvably worse at −11.54 (−20.93 to −2.05). A verified fix cost $0.58 with one agent and $6.92 with 15.
2. The tree repeats its own work
Explicit coordination is under a fifth of a percent of the tokens, so the cost is not overhead. Sibling agents touch the same files more often than the task alone predicts, by 9.8 points (5.0 to 15.1) at 7 agents, and 149 of 165 patches a parent refused, 90.3%, collide line for line when replayed.
Fig. 2The tree repeats its own work149 / 165 collide
Three measurements at increasing granularity, not a causal chain. Retained-class in (a) counts all of a worker's tokens if any
of its patches was applied, so it is an upper bound. Each cell in (c) is one refused patch, replayed with a three-way merge.
If merging is the bottleneck, one writer should fix it. In the return campaign workers handed back written findings and only the root wrote code. That removed every shared write and moved verified success by +1.25 points (−9.76 to +12.82). The design had 80% power at a 16.1-point effect, so this is unresolved, not proof of no effect.
Squares are patches, dots are written findings. The bracket
marks the 16.1 pp effect the design had 80% power to detect. The interval crosses zero, so the effect is unresolved.
3. No tested router resolved an advantage
Delegating only where it helps would rescue the average. Routers trained on 23 features known before a run and tested on unseen repositories did not: none beat the best constant choice with an interval excluding zero (best +0.037, −0.036 to +0.125), and one fitted router chose the single agent for all 39 tasks.
Fig. 4Could a router pick the right tasks?ridge router: 39 of 39 to one agent
Stems run from the best constant policy to each router's verified solve rate on unseen repositories; depth-arm whiskers are
95% intervals of the difference. Return-arm intervals are on the values; pick a row to read them. The oracle is not
runnable: a null with identical arms reproduces 81% of its gap.
Scope and limits
For this model, harness, benchmark and budget, one agent is the defensible default. The cost multiple is precise; the correctness return is bounded but unresolved, and a larger study could still find a modest effect either way. Nothing here speaks to other models, flat teams or other ways to merge. A harness that watches for overlap once workers start could stop paying for branches that find nothing new. I did not build that controller.
Cite
The camera-ready version is not public yet. For the manuscript, email me.
@inproceedings{li2026second,
title = {Verifying the Second Agent: Controlled Experiments on Recursive Delegation in Coding Agents},
author = {Li, Jerry},
booktitle = {NeurIPS 2026 Workshop: Who Verifies the Agents? Toward Reliable Agent Development},
year = {2026},
note = {Also accepted at the NeurIPS 2026 Workshop: Managing Agents that Manage Agents}
}