Frontier Foundry

How to Ship Millions of Lines of Agent-Written Code — Jarred Sumner, Anthropic

Talk notes · AI Engineer ·

A close reading of the source at youtube.com: what it says, what it means for someone who builds with AI, and which claims are the publisher’s own.

Multi-Agent SystemsAI SlopVerification Loops & BackpressureBenchmarks & LeaderboardsAI Vulnerability DiscoveryAnthropic

Problem

Jarred Sumner (creator of Bun, now at Anthropic) merged a PR of several million lines that adds an ahead-of-time (AOT) compiler to Bun, the runtime behind Claude Code. The question he poses: how do you confidently ship millions of lines written by agents (talk)? The goal was to make Claude Code use less memory and start faster; he says about half the CPU time of a typical JavaScript app is spent compiling code on demand (2:04).

Approach

  • Let testing choose the approach. Sumner says the approach is "entirely driven by how do you verify that it actually is going to work." The team did not rewrite Claude Code in Rust, even though they had just rewritten Bun in Rust, because Claude Code's tests would have to be ported, and "as soon as you're rewriting the tests, then you can't really trust the tests anymore" (3:57). Instead they made JavaScript faster.
  • Use tests that predate the project. Bun's existing suite, WebKit's tests, test262 and Cloudflare's tests (6:57).
  • Three versions must agree. Run the app with the JIT, AOT-compiled, and AOT without types; if all three behave the same it works for that app. Then fuzz, with Claude writing code generators (8:27). Also extended a JavaScript-engine fuzzer that V8 uses (transcribed as "V8 Zilly") to test TypeScript types.
  • Batches. Write a big batch of code at once (up to 140 agents at the same time, one build only), then switch to fixing until it compiles and passes (9:12, 12:21). After that he leans on long-lived subagents that keep the relevant context, rather than Claude Code workflows (15:21).
  • Hourly scorecard posted to Slack with previous vs current metrics (16:51).

Lessons learned

  • Five rewrites in about a month. Version 1: Claude Code used about 1 GB. Version 3 got 2x faster startup and 3x less memory but "the code was slop" (any object touching a property named archive was assumed to use the archive API); he said it could not ship (10:46). Version 4 had good code but about 50 s compile time for Claude Code. Version 5: good code, build under 20 s, "very shippable" (13:06).
  • Result (Sumner's numbers): about 4x less memory and about 2x faster startup for Claude Code, in internal dogfooding (4:42). AOT generally beats the JIT but not for code using eval or new Function, such as UglifyJS.
  • Check that tests catch things. "It's really easy to fool yourself" that fuzzing is finding bugs.
  • Re-measure. The agent sizes up ideas wrongly and talks itself out of them, and invents rules; he pushes with questions like "what's taking so long?" Without pressure, models make 0.1% improvements instead of 10%.
  • Early stage: rewrite beats refactor for unshipped large projects. Agents love writing Markdown (1,500 files was "not reasonable").
  • Can try it with bun upgrade --canary and bun compile (21:31).

Theme

Agents & Harnesses.

Where this leads

the concepts it is about

Related briefs

every brief

Cite this page

the version of 2026-11-24
APA
Han, R. (2026, November 24). How to Ship Millions of Lines of Agent-Written Code — Jarred Sumner, Anthropic. Frontier Foundry. https://www.ryanhan.ai/briefs/2026-11-24-aie-talks-how-to-ship-millions-of-lines-of-agent-written-code-jarred-s
BibTeX
@misc{han2026-briefs-2026-11-24-aie-talks-how-to-ship-millions-of-lines-of-agent-written-code-jarred-s,
  author       = {Han, Ryan},
  title        = {{How to Ship Millions of Lines of Agent-Written Code — Jarred Sumner, Anthropic}},
  howpublished = {Frontier Foundry},
  year         = {2026},
  month        = nov,
  url          = {https://www.ryanhan.ai/briefs/2026-11-24-aie-talks-how-to-ship-millions-of-lines-of-agent-written-code-jarred-s}
}