Workflow tool: auto-authored fan-outs inherit expensive model by default and lack cost visibility — 70 agents drained plan limit in <10 min
Summary
Auto-authored Workflow scripts default to expensive model inheritance and unbounded fan-out. One auto-authored workflow spawned 70 subagents and exhausted my plan limit in under 10 minutes. (Corrected 2026-06-12: originally reported as 140 — .meta.json sidecars were miscounted as agent transcripts.)
What happened
In a Claude Code session, the model auto-authored a Workflow (epic-619-plan-impl-review, a plan/implementation review with find → adversarial-verify phases). I approved it via the standard permission dialog. It then spawned 70 subagents:
- 6 finder agents on
claude-opus-4-7, running 36–103 turns each (one agent alone read ~14M tokens via cache) - 64 verifier agents — one agent PER finding — with no
modeloverride, inheriting the session model (Fable 5) witheffortLevel: xhigh. Only ~19 produced output; the other ~45 died at setup (possibly a second bug worth looking at).
Totals for the single workflow run: 69M cache-read tokens, 5.9M cache-write, 1.5M fresh input, 334k output.
Why I consider this a product bug (inconsistent behavior), not just a gap
- The product contradicts its own recommendation. The official cost docs recommend Sonnet/Haiku for subagent tasks, but the Workflow tool spec instructs the authoring model to "default to omitting" the
modeloption — which inherits the most expensive session model. The recommended behavior and the default behavior are opposites. - The only user decision point is uninformed. The approval dialog shows workflow name + description only — no projected agent count, no model tiering, no cost estimate. I approved without the information that would have made approval meaningful.
- The budget mechanism is opt-in. The
budgetdirective exists and works as a hard ceiling, but if the authoring model doesn't emit it, the fan-out runs until the 1000-agent cap or the user's plan limit — whichever comes first. - No deterministic config exists. There is no
workflow.maxAgents, no default subagent model setting, no warning threshold. Model tiering and fan-out shape depend entirely on the authoring LLM's judgment.
Suggested fixes
- Show projected agent count + per-phase model tiering in the approval dialog
- Make a token budget mandatory (or default-capped) for workflows above N agents
- Auto-tier workers to smaller models, or invert the "omit model" guidance for large fan-outs
- Warn when a single stage maps 1 agent per item over a large list
Repro / evidence
Session ID: c7fad4f3-07aa-42bf-8280-0b01c4fbef7d · Workflow run: wf_7d716daf-ac2
I'm happy to provide more details and authorize sharing the session logs/transcripts with Anthropic if useful — just ask here.
🤖 Generated with Claude Code
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗