Anthropic runs large-scale code migrations with Claude Code
a day ago
- Code migrations that used to take years can now be completed in weeks or even days using AI agents like Claude Code.
- Anthropic successfully migrated large codebases, including Bun's million-line Zig-to-Rust port and a Python-to-TypeScript migration of 165,000 lines.
- The core insight is to fix the process (loop) that produces the code, not the code itself.
- A six-step process is used: establish a judge, create rulebook and gap inventory, run a pilot, implement with multi-agent loops, compile and smoke test, and verify behavior parity.
- Key practices include using adversarial reviewers, refining rulebooks iteratively, and leveraging automated workflows to handle dependencies and errors systematically.
- Migrations now cost significantly less (e.g., $165,000 for Bun) but still require a business case, such as performance improvements or reducing technical debt.
- Successful migrations result in measurable benefits, like reduced memory usage, smaller binaries, and faster execution times.