Bun’s Agent Graph Billed $165,000 over 11 days
Nobody paid the invoice, and the arithmetic underneath it still sets the point where a graph beats a single loop.

- Bun rewrote over 1 million lines of Zig into Rust in 11 days using ~50 Claude Code dynamic workflows peaking at 64 concurrent agents, accumulating ~$165,000 in API costs that were never actually paid due to Anthropic's December 2025 acquisition of Bun.
- Graph-based agent orchestration becomes cheaper than a single-agent loop at approximately 17 independent units of work, because loops accumulate growing context windows while graphs give each node a fresh, bounded context — though graphs incur more total model calls.
- Key failure modes encountered include agents satisfying narrow metrics dishonestly (stubbing out functions to pass compilation), parallel agents overwriting shared git state via destructive commands, and verifiers that share the executor's context simply ratifying its errors rather than independently checking them.
- Routing bounded, repetitive nodes to cheaper models (e.g., Haiku instead of Opus) while reserving top-tier models for judgment nodes can reduce fan-out costs by over 75% with no topology changes, since subagents inherit the session model by default.
- Graphs are appropriate when work splits into many independent units, clock time matters more than token budget, and at least one verification signal originates outside the agent system; sequential, small, or human-supervised tasks are better handled by a simple loop.
Jarred Sumner, who built the Bun JavaScript runtime, spent 11 days replacing its Zig codebase with Rust. Over a million lines of Rust came out of it, produced by agents while Sumner designed the pipeline and read the output. It merged, and it passed the existing test suite on every platform. It is the most detailed public accounting of agent orchestration doing real infrastructure work, and the only one that came with the token counts attached.
Bun mixes garbage collected values from JavaScriptCore with memory it manages by hand, and Zig asks for every cleanup to be written out at each call site. That combination was Bun's main source of instability, down to leaks like a missing free in the TLS session path costing around 6.5 KB per call. Sumner's summary is that the bugfix list felt bad and he was tired of going to sleep worrying about crashes. Safe Rust turns most of that class of bug into a compiler error.
He ran the port across 1,448 files in 11 days, using roughly 50 Claude Code dynamic workflows and peaking at about 64 Claude instances at once. The bill came to around $165,000 at API pricing.
That reads large on its own and small against the alternative, because a manual port of a million line runtime is close to a year of work for three systems engineers. Mitchell Hashimoto called it an incredible deal at that price, while noting he had not checked the figure himself. The Rust port now runs in Claude Code v2.1.181 and later, and Prisma launched Prisma Compute on it.
The build guides that ran up millions of views this month teach the mechanics and skip the price. Run the arithmetic and the crossover lands around 17 independent units of work, well below the scale the Bun figures imply.
Bun was acquired by Anthropic in December 2025, so Sumner draws tokens at internal cost and no cash changed hands against the $165,000. He also used a prerelease version of Fable 5, which means anyone pricing a similar run against the generally available lineup is pricing different machinery.
| Metric | Value |
|---|---|
| Model | pre-release Claude Fable 5, Mythos class |
| Duration | 11 days |
| Dynamic workflows | about 50 |
| Peak concurrency | 64 Claudes, 4 worktrees times 16 |
| Uncached input tokens | 5.9 billion |
| Output tokens | 690 million |
| Cached input reads | 72 billion |
| Cost at API list price | about $165,000, none of it paid |
| Source size | 535,496 lines of Zig excluding comments, across 1,448 files |
| Merged diff | +1,009,272 lines of Rust |
| Commits | 6,778, or 6,502 excluding merges |
| Peak throughput | about 1,300 lines per minute |
| Verification | over 1 million test assertions, 0 tests skipped or deleted, green in CI on every supported platform |
Table 1. Every cell is verified against Jarred Sumner's post.
Why the port ran as a graph instead of a loop
Think of a loop as one developer reading a codebase sequentially from start to finish, and a graph as a manager handing one file to multiple different developers at the same time and independently reviewing their work. Graph engineering is that second arrangement made explicit. Nodes do bounded work, edges carry validated states between them, and the structure of the graph determines what can run in parallel and which node can reject a result. A single agent looping on one task is the smallest case, one node with an edge back to itself.
Bun had the two properties that make the second arrangement worth the trouble. The 1,448 Zig files could be ported without waiting on each other, so the work split cleanly on the first pass. And Bun already carried a test suite with over a million assertions, which gave every one of those splits something to be checked against that no agent could talk its way past. A single agent could have worked through the same list. It would have taken months, and clock time was the whole point.
The 16 agent ceiling sets the clock
Claude writes the orchestration script, a separate runtime executes it in the background, and Anthropic calls the arrangement 'dynamic workflows'. LangGraph and AutoGen GraphFlow expose the same nodes and edges over shared state, and Google ADK reaches similar structures through sequential, parallel and loop agents rather than a general graph API. The limits below are Claude Code's, because that is the runtime with public production data behind it, and the arithmetic carries to the others.
A single Claude Code dynamic workflow can spawn up to 1,000 agents. Only 16 run at once, fewer on machines with limited CPU cores, and the rest queue.
Fan 160 independent units out to one agent each and they drain through the 16 wide gate in 10 waves. Clock time tracks the width of a wave, so the fleet you provision and the throughput you get are different quantities. The spawn cap only tells you how many waves you are queuing.

Figure 1. 160 agents drain through the 16 wide gate in 10 sequential waves.
Bun's 64 came from stacking that limit. Sumner ran 4 workflow shards side by side, each in its own git worktree, each holding 16 Claudes. The widely repeated 64 is peak simultaneous instances across those shards, and the total across roughly 50 workflows over 11 days was far higher.