Skip to content

Anthropic Migrates Millions of Lines of Code with Claude in Weeks Instead of Years

In brief: Anthropic has executed large-scale code migrations of millions of lines in weeks where previously years and millions of dollars were required — made possible through Claude-based agentic workflows and focused process management.

Anthropic has conducted two large migration projects: a Bun developer ported one million lines of code from Zig to Rust in less than two weeks, a second team transitioned a Python codebase with 165,000 lines to TypeScript code over a weekend. Claude Code and agentic workflows have fundamentally changed the economics of language migration projects.

Two concrete migration examples: Jarred Sumner, Bun co-founder, used Claude Code to migrate Bun from Zig to Rust. Over one million lines of code were generated in less than two weeks. The entire existing test suite passed in CI before the merge with 100% success. After the merge, 19 regressions occurred, all of which were fixed. The Rust port was shipped in June. In parallel, Mike Krieger and the Anthropic Labs team migrated a Python codebase with 165,000 lines to TypeScript code over a weekend — consisting of hundreds of agents, eight phase gates, three adversarial review rounds, and a final parity check that compared every command against the Python original.

Costs and resource requirements: The Bun migration consumed 5.9 billion uncached input tokens and 690 million output tokens, which at API prices corresponds to approximately 165,000 US dollars. Mike’s port required 27 million tokens. Previously, a million-line migration would have required three to four million dollars over four years — now it is tens to hundreds of thousands of dollars or more, but in weeks or months instead of years.

When a migration becomes economically viable: Language migration projects were previously justified only in existential business cases — the risk was too high, the duration too long, the career risk for engineers too great. Now a chronic performance bottleneck is sufficient. For Mike’s team, compile time was the trigger: the 30-minute window across the entire build matrix per release was reduced to approximately two seconds after the TypeScript port, the binary starts 6x faster, and a separate deployment pipeline could be retired.

Why AI models change migration mathematics: Claude Sonnet 4.1 and Claude Opus 4.8 are particularly strong at delegating, directing, and verifying parallel workstreams. The core principle of Anthropic’s processes is not: fix the code. Fix the process (the loop) that generated the code — an approach implemented over six defined steps.


Source: claude.com · Published July 15, 2026
Lumi AI News — AI-assisted curation pursuant to Article 50 EU AI Act. Paraphrase and classification by Lumi News Pipeline v1.7.3.

Share on: