Multi-agent jobs usually get one of two shapes. Either the lead calls each helper in turn and reads every report, so it becomes the bottleneck. Or someone hard-codes the steps, and every job gets the same treatment.
A third shape is getting attention. The lead writes the whole plan once, as a short program, and ordinary code runs it with parallel workers.
That moves the model’s judgement to one moment, planning, instead of spending a call between every pair of steps. If you have read why most supervisors are switch statements, this is a third answer to the same complaint: drop the per-step model call, but let a model write the routing once.
The question is whether the plans are actually better. A recent open study by Fareed Khan, with its code and data on GitHub, measured exactly that, and the honest answer is more interesting than “yes”.
What was measured
The benchmark is a public library of 849 Python files, about 1.35 million tokens, with 72 bugs planted by the author. A hidden key scores what each design reports. Five designs ran against the same key:
| Design | Runs | Mean recall | Mean precision | Mean credits |
|---|---|---|---|---|
| One agent alone | 3 | 0.02 | 1.00 | 23.7 |
| One agent with the dynamic run’s budget | 2 | 0.04 | 0.78 | 46.4 |
| Lead calling helpers | 1 | 0.17 | 0.67 | 10.3 |
| Hand-written fixed plan | 3 | 0.30 | 0.82 | 13.8 |
| Lead writes the plan | 3 | 0.45 | 0.71 | 48.4 |
The single agent stopped on its own every time, even with the larger budget. That result is clean.
The headline comparison is the last two rows. The lead’s plans found more bugs than the fixed plan, with a bootstrap interval of +0.06 to +0.25 on recall. They also cost about 3.5 times as much and gave up precision: 0.71 against 0.82.
The caveat that decides the reading
Look at what the lead’s first program actually did. It scanned every shard in fourteen rounds, rotating through review lenses, then verified and voted.
The fixed plan made three passes, one per lens. So the lead’s plan read a lot more.
The study says it plainly: no fixed plan told to scan fourteen times was ever run. The gain cannot be split between better planning and more reading. A fixed plan with a bigger loop might have closed most of that gap at a fraction of the design work.
Two more numbers point the same way. Of ten programs the lead wrote, all ten looped and decided what to do from their results. Only one of them ever read the remaining budget.
And the author wrote down eleven predictions before the runs. Three held.
I would not take this as evidence that model-written plans are smarter. I would take it as evidence that more scanning finds more planted bugs, which is useful and much less exciting.
The part worth copying
What the study does build well is the machinery around the plan. Three checks run before a single worker starts:
- A whitelist on the plan’s syntax. The plan is restricted Python. No
import, notry, nowhile. The rejection message tells the lead to useforoverrange(n)instead, so the loop states its bound. - A dry run that prices it. The plan runs once against a stand-in model that answers instantly and costs nothing. That count of calls becomes the estimate.
- An approval gate. Under an automatic limit the plan runs. Above it, a person decides.
The study did not measure what these checks are worth. They are worth copying anyway, because they are cheap and the failure they prevent is expensive.
The gate has one detail worth stealing. The lead’s first program was priced at 263 workers and 52.9 credits, above the automatic limit of 40. In the study’s run, a standing rule stood in for the person: approve anything up to half the 150-credit budget. The rule existed before any estimate, so it could not be fitted to the number.
These are the guards every agent loop needs, moved from runtime to planning time. A bounded loop is the step limit. The gate is the confirmation before something irreversible, here something expensive, shown for the whole plan at once rather than call by call.
Price the plan before it spends
The dry run has a weak spot, though, and the study shows it on its own numbers. The fixed plan’s rehearsal estimated 10.1 credits, 27% below the 13.8 its real runs cost. A plan that adapts to its budget priced at 23.9 or 8.3 credits depending on which budget the rehearsal was shown.
The study’s advice is to calibrate the stand-in on one real run first. A sketch shows why.
Here is a plan of the kind a lead writes. Scan until a round adds little, never more than fourteen rounds. It is priced two ways, against two free stand-ins:
type Finding = string;
type Kit = { scan: (shard: number, round: number) => Finding[]; calls: () => number };
type Plan = { maxRounds: number; shards: number; run: (kit: Kit) => Finding[] };
const PRICE_PER_CALL = 0.2; // credits; billing is per call
const AUTO_APPROVE = 25; // above this, a person decides
const plan: Plan = {
maxRounds: 14,
shards: 14,
run(kit) {
const seen = new Set<Finding>();
for (let round = 0; round < this.maxRounds; round++) { // bounded loop: the bound is in the code
let fresh = 0;
for (let s = 0; s < this.shards; s++)
for (const f of kit.scan(s, round)) if (!seen.has(f)) { seen.add(f); fresh++; }
if (fresh < 3) break; // the stopping rule the price depends on
}
return [...seen];
},
};
// Static ceiling: no model needed, only the loop bounds.
const ceiling = plan.maxRounds * plan.shards * PRICE_PER_CALL;
function standIn(scan: Kit["scan"]): Kit {
let n = 0;
return { scan: (s, r) => { n++; return scan(s, r); }, calls: () => n };
}
const hash = (x: string) => [...x].reduce((h, c) => (h * 31 + c.charCodeAt(0)) >>> 0, 7);
const stands: Kit[] = [
// tuned to dwindle: new findings dry up after three rounds
standIn((s, r) => (r < 3 && s % (r + 1) === 0 ? [`bug-${s}-${r}`] : [])),
// blind: answers from a hash of the question, so every round looks productive
standIn((s, r) => (hash(`${s}:${r}`) % 3 === 0 ? [`claim-${s}-${r}`] : [])),
];
console.log(`static ceiling: ${plan.maxRounds} rounds x ${plan.shards} shards = ${ceiling.toFixed(1)} credits`);
for (const [i, kit] of stands.entries()) {
const found = plan.run(kit);
const cost = kit.calls() * PRICE_PER_CALL;
const verdict = cost <= AUTO_APPROVE ? "auto-approve" : "hold for a person";
console.log(`${["dwindling", "blind "][i]} stand-in: ${kit.calls()} calls, ${cost.toFixed(1)} credits, ${found.length} findings -> ${verdict}`);
}
Run with Node 24, which strips the types natively:
static ceiling: 14 rounds x 14 shards = 39.2 credits
dwindling stand-in: 56 calls, 11.2 credits, 26 findings -> auto-approve
blind stand-in: 196 calls, 39.2 credits, 66 findings -> hold for a person
Same plan, same code. The estimate moves from 11.2 to 39.2 credits, and the gate decision flips, depending only on how the free stand-in behaves.
The blind one never lets the stopping rule fire, so it prices the worst case. The dwindling one prices a quiet run. Neither knows what the real model will do.
So the number to trust without calibration is the first line. The static ceiling comes from the loop bounds alone, with no model in the picture.
That only works when every loop is bounded by numbers you know, as in the sketch. A loop over the model’s own findings has no ceiling you can compute in advance.
And a bound is not the same as a cheap bound. The study’s runaway test plan, for i in range(1000000), passed every syntax rule. Its dry run was cancelled by the hard limit of 1,000 workers per run, not by the whitelist. A computed ceiling of a million calls would have flagged it too, which is the point of having one.
The boring version I actually run
In a recent batch of fixes for Plune, the test management system I’m building, I worked from a written plan, not a model-written one.
Its bug list became three briefs, each with explicit decisions, bounds and tests. Three implementers ran in parallel in separate worktrees, with no overlapping files. I opened a fourth slot only after confirming 8 GB of free memory.
The rule I keep from that batch is about what comes back. Every implementer’s “done” is checked mechanically before review: the commit, the author, the trailers, the diff. A report is model output, not evidence.
That step does the job the study’s skeptics do, but without a model: it refuses to take the worker’s report as the result. The study’s ablation found two features that earned their calls, the skeptic stage and a second scanning round. The review lenses, the sandbox and a cross-generation judge came out neutral.
So my setup has one of the two things the study found worth paying for, a verification step that does not trust the worker’s own word. It does not have the other, a second pass over the same ground. And it lacks the lead deciding how many rounds to spend, which on this evidence is the part I would add last.
Where this breaks
- The evidence is thin. Three runs or fewer per design, one library, one model family, wide intervals. The dynamic runs were no more consistent than one agent working alone.
- The whitelist is not a sandbox. The study says so itself: it is not a security boundary, because the plans come from its own lead. A plan built from untrusted input needs a real isolation boundary, not a list of banned syntax nodes.
- Precision is a lower bound. Anything outside the hidden key counts as a false alarm, so a real bug the author did not plant would be scored against the design.
What to take from it
Letting the lead write the plan as code is a reasonable design. The reasons to do it are not the ones in the headline, though.
Copy the checks: bounded loops, a dry run, a gate whose rule exists before the estimate does. Treat the dry-run price as a guess until a real run calibrates the stand-in, and trust the static ceiling in the meantime.
Then, before crediting the planner, run the fixed plan with the same budget. If the two land close, you have learned that the job needed more reading, not more intelligence. That is cheaper to buy.