While most engineering teams migrate services incrementally, Anthropic took the wholesale route. The company has moved the Messages API, the main entry point that developers use to call Claude, from Python to Rust in a single rewrite, and the new version went fully into production last week. The figures behind it are company-reported from a podcast interview and have not been independently verified: CPU use fell by roughly 40 to 50 percent, and time to first token improved by about 10 to 20 percent, with the largest gains on long-running tasks.
The story came out on the Latent Space podcast from Katelyn Lesse, who leads engineering at Anthropic, and Angela Jiang, who leads product. Jiang recalled that when she joined about a year ago, the API was a Python monolith running in a single Google Cloud region. The recurring constraint was not GPUs but CPU: the API service, product backends, code sandboxes and continuous integration all competed for the same processor quota, and the Python service consumed a disproportionate share of it.
The choice of Rust was contested inside the company for a blunt reason. As the team put it, there was not a single Rust developer in the room when the decision was made; engineers with Rust experience were only brought in later. The division of labor that made the migration possible was unconventional: human engineers owned the design and verification of the distributed system, while Claude wrote most of the implementation code. Claude was even used to help the team's engineers learn the language as they went.
Neither executive said how many months the port took or what share of the code Claude generated, and those numbers cannot be checked externally. The verification process was entirely traditional, and the two leads stressed that it mattered more than the writing itself. The team first built a complete Rust branch of the API and shadow-copied live traffic to it, comparing old and new outputs request by request. Real traffic then moved over gradually through feature flags and load balancing, while static analysis flagged any features added in Python that had not yet found a Rust counterpart.
Anthropic estimated that a conventional piece-by-piece migration could have taken several years. The calculation that favored the one-shot port was the cost of getting it wrong: because the team could compare every request between the two stacks before cutover, a behavioral mismatch would be caught in verification rather than in customer production systems. The Messages API handles all external calls to Claude, so there was little room for drift.
The rewrite fits a wider pattern of AI-assisted large migrations. GitHub previously disclosed using Copilot to help rewrite its own runtime into roughly 830,000 lines of Rust, and around the release of Opus 5.5 one team moved a TypeScript compiler to Rust in two weeks. In each case the target was Rust and humans acted as the safety net, with the transferable asset being the verification process rather than the language choice.
Anthropic says architecture-level changes are coming next, including storing conversation state on the server so clients no longer resend the full history on every turn, which could save substantial transmission and processing cost in long conversations. No date or billing impact has been announced. The CPU savings, however, compound immediately: in a business where inference margin is everything, cutting the overhead around the model by half is as valuable as making the model itself cheaper.
Comments (0)
Log in to join the discussion
Log InNo comments yet