Anthropic's Claude Code Migrates 1M Lines of Code to a New Language in Two Weeks
Anthropic
Engineers at Anthropic used Claude Code to migrate large codebases in days or weeks, with Jarred Sumner migrating Bun from Zig to Rust and Mike Krieger porting a Python codebase to 165,000 lines of TypeScript. The article details the six-step process and the economics of AI-driven code migration, including token costs and test outcomes.
Anthropic reports that using Claude Code and models like Claude Fable 5 and Claude Opus 4.8, developers can migrate large codebases to a new language in days or weeks instead of years. Two examples are highlighted: Jarred Sumner, co-founder of Bun, used Claude Code to migrate Bun from Zig to Rust, producing a million lines of code in less than two weeks, with only 19 regressions found after the merge, all since fixed. Mike Krieger, an Anthropic Labs leader, migrated a Python codebase to 165,000 lines of TypeScript over a weekend, using hundreds of agents, eight checkpoints, three rounds of adversarial review, and a final parity check. The article outlines a six-step process for such migrations, starting with establishing a reliable arbiter (test suite), then creating a rules document, dependency map, and divergence registry, followed by parallel agent-driven translation, compilation, and testing. It notes that the Bun migration cost about 5.9 billion uncached input tokens and 690 million output tokens, roughly $165,000, while Mike's migration used 27 million tokens. The economics have changed, making migrations feasible for smaller benefits, such as reducing compile times from eight minutes to two seconds.
- Abbreviations
- CLI = Command-Line Interface — интерфейс командной строки
- CI = Continuous Integration — непрерывная интеграция
Source: Habr — хаб ИИ —
original
