How Anthropic runs large-scale code migrations with Claude Code
Anthropic engineers used Claude Code (Fable 5 and Opus 4.8) to migrate Bun from Zig to Rust in two weeks, producing one million lines of code with 100% test pass rate; another engineer ported a Python codebase to 165,000 lines of TypeScript over a weekend. The article details a six-step migration process: create rulebook and dependency map, stress-test rules, translate everything (parallel), compile, run, and match behavior. The core insight is to fix the loop that produces code, not the code itself. It discusses when migrations are justified, why AI changes the economics (parallelism, clear context, built-in referee, self-generating queue), and best practices (use smaller models for implementation, largest for review). Concrete token and cost data are provided: Bun migration consumed ~5.9B uncached input tokens and 690M output tokens, costing ~$165k at API pricing.