How the rewrite happened

Anthropic bought Bun in December 2025 and set out to replace its Zig codebase with Rust. The company ran a pre-release version of Claude Fable 5—an LLM unavailable to anyone else at the time. Sixty-four copies of the model worked in parallel, spitting out roughly 1,300 lines of code per minute in total.

Lead engineer Jarred Sumner didn’t hand the problem to the agents and walk away. He first spent hours drafting a guide that mapped Zig idioms to Rust equivalents. A three-file trial run let him calibrate the agents’ output before tackling the full repository. For every change the agents suggested, two “adversarial” agents reviewed it, and Sumner watched the whole process live for the entire 11-day stretch.

Anthropic’s internal accounting logged $165,000 in token usage. That number reflects only the raw API calls made before the code merged into the main branch.

The hidden bill

The $165 k figure omits the compute needed to stabilize the new Rust code. Post-merge fixes, continuous-integration runs, and extra testing could push the total spend higher, according to an internal analysis. The estimate uses public API pricing; because Claude Fable 5 was a private preview, the actual price paid may differ.

Speed versus safety

The rewrite produced a Rust runtime that runs faster than the original Zig version, but it also left a sizable audit backlog. About 4 % of the newly generated Rust files contain “unsafe” blocks—code that bypasses Rust’s strict safety guarantees. Hand-written Rust projects typically see a far lower percentage, meaning reviewers now must verify that those blocks don’t expose memory-corruption bugs.

The agents’ output would be meaningless without Sumner’s expertise. Even at 1,300 lines per minute, the code needs a knowledgeable overseer to catch logical errors, ensure architectural coherence, and confirm that the test suite truly covers the new implementation.

When AI shines, and when it doesn’t

The Bun port was a textbook translation: one language to another, with a comprehensive test suite already in place. That clean boundary gave the LLM a clear target and limited the need for creative problem-solving. Most software work, however, involves shifting business rules, handling ambiguous requirements, or building new features from scratch. In those messier scenarios the same level of AI assistance is unlikely to yield comparable speed or cost benefits.

Proponents of AI-augmented development point to the raw productivity numbers—thousands of lines generated in minutes—as proof that large language models can replace large teams. The Anthropic case tempers that view: the headline token cost excludes the substantial compute needed for post-merge validation, and the safety debt created by “unsafe” code will require human effort to resolve.

What to watch next

Anthropic has not disclosed whether it plans to apply the same Claude-driven workflow to other codebases. If it does, the company will need to factor in the total lifecycle cost, not just the token bill. Observers should keep an eye on:

  • How quickly the audit backlog shrinks and whether the “unsafe” proportion drops as reviewers refactor the code.
  • Whether future runs use a more mature model that is publicly purchasable, which could make cost estimates more transparent.
  • The impact on Bun’s adoption: faster runtimes may attract users, but any security concerns could offset that gain.

Takeaway

AI can turbo-charge straightforward code translations, but downstream compute and human verification costs can eat away at token-bill savings. The Bun rewrite shows that while large language models can spew massive amounts of code quickly, human expertise remains essential for safety, correctness, and the nuanced work that drives most software projects.