On July 16, 2026, Anthropic published a detailed engineering guide on how its teams run large-scale code migrations with Claude Code, turning what used to be multi-year rewrites into projects measured in days. The headline example: Bun, the JavaScript runtime Anthropic now backs, was ported from Zig to Rust with roughly a million lines of code produced in under two weeks, and 100% of Bun's existing test suite passing before merge. The guide is less a victory lap and more a repeatable playbook, and it is the most concrete look yet at how agentic coding scales past a single chat window.
For creators and builders, the interesting part is not that AI wrote a lot of code. It is the process, a systematic pipeline of parallel agents, adversarial review, and mechanical work queues that anyone can adapt for their own migrations, refactors, or framework jumps.
What Anthropic Actually Shipped
The guide documents ten internal migration projects, each tens to hundreds of thousands of lines, alongside the flagship Bun rewrite. The core insight is that a large migration is not one giant prompt. It is thousands of small, verifiable translations run through a controlled loop, where the model fixes the process rather than individual files. Anthropic ran the work on multiple models in parallel, primarily Claude Fable 5 and Claude Opus 4.8, coordinated by dynamic workflows rather than a human steering each step.
Jarred Sumner, Bun's creator and now a member of technical staff at Anthropic, supervised the Rust port by spending about three hours defining mapping patterns, then monitoring the output of 64 parallel Claude instances running an implementer and reviewer pattern. Independent write-ups from Simon Willison and the Bun team corroborate the scale and the 100% test-pass gate before any code merged.

One-Shot Prompt vs the Migration Pipeline
The difference between "rewrite Bun in Rust" as a single prompt and Anthropic's approach is the difference between a demo and a shipped product. The table below maps the two mindsets.
| Dimension | One-shot prompt | Anthropic's migration pipeline |
|---|---|---|
| Unit of work | Entire codebase at once | Thousands of small, verifiable translations |
| Agents | Single model, single pass | 64 parallel instances, implementer plus reviewer |
| Verification | Human reads the diff | Compiler output and test suite as the judge |
| Failure handling | Re-prompt and hope | Mechanical work queue fed by errors |
| Human role | Reviews every file | Defines rules, monitors the process |
| Result | Plausible but unreviewed code | 100% test-pass parity with the original |
The Six-Step Migration Playbook
Anthropic distilled the process into six repeatable steps. You can run a scaled-down version of this yourself with the Claude Code CLI on a much smaller project.
- Build the rulebook. Create a translation guide, a dependency map, and a gap inventory that tells the agent how each pattern in the source language maps to the target.
- Stress-test the rules. Run the rulebook against a few representative files first and fix the mapping patterns, not the output, when something breaks.
- Translate the whole codebase. Fan the work out across parallel agents, each taking a slice, all following the same rulebook.
- Compile and fix errors. Feed compiler output back in as a work queue so agents chew through failures mechanically.
- Run smoke tests. Catch the obvious runtime breakage before deep validation.
- Validate behavioral parity. Compare the new code against the original's behavior automatically, rather than relying on a human to eyeball every diff.

By the Numbers
The Bun rewrite ran from May 3 to May 14, 2026, roughly eleven calendar days with about six days of pure agent coding time. The economics are worth sitting with.
- ~1 million lines of Rust produced from the Zig source
- 64 parallel Claude instances at peak
- 5.9 billion uncached input tokens and 690 million output tokens
- ~$165,000 in API fees for the full migration
- 19% smaller binary on Linux and Windows, with a reported 2 to 5% speedup across HTTP serving and real-world workloads
At $165,000, the raw cost is real, but set against the salary and calendar cost of a multi-engineer, multi-year rewrite, the trade starts to look different for teams with a genuine migration on the roadmap.
What This Enables for Builders
You do not need a Bun-sized codebase to use this. The playbook generalizes to any translation task where you can define rules and verify results automatically: porting a component library from one framework to another, migrating a project off a deprecated API, converting a codebase from JavaScript to TypeScript, or modernizing legacy code. The pattern of small verifiable units, a compiler or test suite as the judge, and parallel agents fed by a work queue is the same whether you run 2 agents or 64.
The closest creator-facing echo of this we have covered is running cheap AI coders as Claude subagents, and the broader shape shows up in agentic automation pipelines on GitHub. Both lean on the same idea Anthropic just formalized: let the machine verify the machine.
The Controversy Worth Knowing
The rewrite was not universally celebrated. Zig's creator publicly called the Claude-generated Rust rewrite "unreviewed slop", arguing that a passing test suite is not the same as a well-designed, maintainable codebase. A separate case-study analysis weighed the same tension: automated behavioral parity proves the code does what the old code did, but says less about long-term readability and architecture. It is a fair caution. The playbook optimizes for verified equivalence, and teams adopting it should decide for themselves where human architectural review still belongs.

What to Do Next
If you have a migration or large refactor on your plate, start small: pick one module, write a one-page translation rulebook, and let Claude Code translate it while your test suite acts as the judge. Scale the number of parallel agents only once the rulebook is solid. For a lighter-weight taste of Claude Code doing translation work, our writeup on how Claude Code ported Command & Conquer: Generals to Mac and iPhone shows the same loop on a hobby-scale project.
Frequently Asked Questions
How long did the Bun Zig-to-Rust migration take?
About eleven calendar days, from May 3 to May 14, 2026, with roughly six days of pure agent coding time. Roughly a million lines of Rust were produced, with 100% of Bun's existing test suite passing before merge.
How much did it cost?
Around $165,000 in API fees, driven by 5.9 billion uncached input tokens and 690 million output tokens across the migration.
Which Claude models did Anthropic use?
Primarily Claude Fable 5 and Claude Opus 4.8, running in parallel and coordinated by dynamic workflows rather than a single steering prompt.
Can I use this playbook on a small project?
Yes. The six-step process scales down. Define a translation rulebook, translate module by module, use your compiler and test suite as the judge, and add parallel agents only after the rules are proven. The Claude Code CLI is enough to start.
Why was the rewrite controversial?
Critics, including Zig's creator, argued that a passing test suite does not guarantee a maintainable, well-architected codebase, and called the output unreviewed. The method optimizes for verified behavioral parity, so teams should decide where human architectural review still fits.
What made the migration reliable rather than "AI slop"?
The compiler and test suite acted as the judge, an implementer-and-reviewer agent pattern caught errors, and the team fixed the translation rules rather than individual files, so systemic mistakes were solved once instead of repeatedly.