Vibeleaderboard
← All Intel
Intel / post

How Anthropic runs large-scale code migrations with Claude Code

Source
x.com
Author
ClaudeDevs
Date

Context

Anthropic's code-migration account puts the acceptance test before the translation. It recommends running the same external-behavior checks against the original program and its replacement, then deliberately breaking code to confirm those checks detect failures.

The old program supplies a concrete reference for what the new one should do. Repeated errors then feed changes to the translation rules, so subsequent batches can avoid the same mistake. The account also reports that Bun's existing tests all passed before its Rust migration was merged, yet nineteen regressions surfaced afterward and were fixed. Passing the inherited suite established a useful checkpoint while leaving behavior outside its coverage to be discovered.

Key quotes

“A million lines of code were produced in less than two weeks, with 100% of Bun's existing test suite passing in CI before merge.”

“The core insight is that you don't fix the code. You fix the process (loop) that produced the code.”

“The Bun migration, for example, consumed 5.9 billion uncached input tokens and 690 million output tokens — around $165,000 at API pricing.”

“After the port, the same compile now takes about two seconds, the binary starts 6x faster, and the team was able to retire a separate deployment pipeline.”

“Now, the worst case scenario is you delete the branch and try again.”

More from ClaudeDevs
Recommended reads
Comments

Checking sign-in…

Loading comments…