Skip to content
mentoor

Topic 5 of 5 · 5 min read

Overspawning, drift and lost context in subagents

Goal: Read a multi-agent run log and identify the overspawn, drift or conflicting edit that wasted tokens or broke the result.

Most subagent failures fall into five kinds: too many spawned, too little context passed, summaries that lose facts, workers that drift from the brief, and parents that believe the report.

Check yourself · 1 of 3

A worker was told to fix one function and the diff shows 11 changed files. Which failure is this?

Choose one answer

Why it matters

Delegation looks free because the parent's window stays clean, but the work is still paid for. Anthropic reports about 15 times more tokens for multi-agent systems than for chats. A run that spawns eight workers for a two-file change burns that cost for no gain. And a broken result is slow to debug, because the failure sits in a report you did not see being made.

The failure modes

  1. Overspawn. Many subagents for small work, or a worker that spawns more workers. Cause: no rule for effort. Fix: state in the plan how many agents a task of this size deserves.
  2. Lost context. The worker did not know a constraint, so it picked a library you ban. Cause: a thin brief. Fix: write constraints into the brief.
  3. Lossy summary. The worker found three bugs and reported one. Cause: no return format. Fix: ask for a count and a list, and for what was not checked.
  4. Drift. Asked to fix one function, it refactored the module. Cause: open scope. Fix: a path allow-list and "do not touch other files".
  5. Blind trust. The parent merged "done" with no check. Fix: verify with the diff and the tests.
  6. Conflicting edits. Two workers wrote one file. Fix: disjoint ownership.

How to read a run log

Look for four things: how many agents started against how many the task needed, which paths each one changed, what each report claimed against what the diff shows, and whether two workers touched one path.

Before and after

Weak run: the parent starts six workers for a one-package change, no scope, no review. Two edit config.ts, and the final summary says "all done".

Better run: one explore agent, two workers with disjoint paths, one reviewer, and the parent checks git status to see only allowed files changed.

What goes wrong

  • Cost only measured at the end. Budget runs out halfway through a large fan-out.
  • Retry loops. A worker keeps retrying a failing command with no stop rule. Set a limit.
  • Confident wrong report. Models write fluent summaries even when a step failed.

Examples

A run log with two faults

10:02 spawn explorer-1  (task: find rate-limit config)
10:02 spawn explorer-2  (task: find rate-limit config)
10:03 spawn worker-a    paths: src/limits.ts
10:03 spawn worker-b    paths: src/limits.ts, src/index.ts
10:09 worker-a done: edited src/limits.ts
10:10 worker-b done: edited src/limits.ts, src/index.ts
10:11 parent: merged, all done

Faults: two explorers with the same task (overspawn), and both workers own src/limits.ts (conflicting edit). Nobody reviewed the result.

Drift

Brief: "Fix the null check in parseUser." Report: "Fixed it, and cleaned up the whole users/ folder." The diff shows 11 files changed. The parent reverts the 10 files outside scope.

Key points

  • Multi-agent runs multiply token cost, so spawn only as many agents as the task needs.
  • Constraints not in the brief are not known to the worker.
  • Without a return format, summaries drop findings.
  • Open scope lets workers drift into unrelated edits.
  • Compare each report with the diff and check that no path was edited by two workers.

Common mistakes

  • Spawning workers for small tasks and never measuring what the run cost.
  • Letting workers retry failing commands without a stop rule.
  • Accepting a summary of three words for a task that changed many files.
  • Letting two workers share a path because "they will not conflict".

Check yourself · 2 of 3

A run log shows two workers both listing src/limits.ts as their path. What is the risk?

Choose one answer

Check yourself · 3 of 3

Why is a worker's report of "done" not enough to merge?

Choose one answer

Practice items, not counted towards your mastery.

Start here