Home/ Incident database/stat-stanford-digital-economy-loop-2026
Financial loss Runaway loop verified aggregate statistic

Stanford Digital Economy Lab: agentic coding tasks consume ~1,000x more tokens than chat, with up to 30x variance on the same task

Stanford Digital Economy Lab · May 5, 2026 · Coding agent

What happened

The Stanford Digital Economy Lab analyzed token consumption in agentic coding tasks and found they consume roughly 1,000x more tokens than chat or single-step code reasoning, with up to 30x variance on the same task depending on how the agent approaches it. Industry summaries of the finding note that a 10-turn agent loop sends roughly 50x the tokens of a single linear call, because every turn re-reads the full conversation history and tool definitions.

Loss / impact
May 5
2026
Runaway
Failure mode
Coding
Agent type

Causal vector

Aggregate measurement of loop-driven token consumption in agentic coding workflows

Source

Reported by Stanford Digital Economy Lab. Verified against the primary report.

Read the original report ↗

How a spend firewall would have helped

30x cost variance on the same task means no human estimate is safe: only a measurement layer that sees each run's token spend, and a policy layer that caps it, turns this variance from a budget risk into a known quantity.

The six rule types that contain this class of failure

Per-transaction cap

Any single spend above your ceiling is BLOCKED before it moves.

Daily total

Cumulative spend across all agent calls, bounded per day.

Velocity limit

Stops runaway retry loops — the #1 cause of overnight losses.

Merchant allowlist

Only approved destinations can ever receive funds.

Category rules

Flag high-risk classes (crypto, infra, refunds) for review.

Approval threshold

Above a value, the action waits for a human.

Related incidents

Runaway while-loop in Claude agent burns ~$47,000 in API tokens overnight

anonymous (engineering post-mortem) · Dec 1, 2025

Don't be the next entry

Every incident in this database is the result of trusting a prompt, a provider cap, or a human review cycle. sipi.bot replaces all three with one deterministic call. 67 documented failures, one control.