File photo: Anthropic chief executive Dario Amodei at TechCrunch Disrupt 2023. Photo: TechCrunch / Wikimedia Commons (CC BY 2.0)
SAN FRANCISCO, 25 November 2026 — Anthropic says it has moved the Messages API that carries traffic to Claude from Python to Rust, cutting processor use by about 70 per cent per request and reducing median time to first token by about 20 per cent, without taking the service offline.
The company set out the work in a research post published on 25 November. The Messages API is the main way that customers — and Anthropic’s own products, including Claude Code — reach the model. From early 2024 to the autumn of 2026, API traffic grew roughly 1,800 times, the post said, far beyond what the original Python service had been built to handle.
Claude wrote a first version of the API’s core request path in about a week. The harder problem, the authors said, was verifying that the Rust service matched the behaviour of the live Python system. The production API kept changing during the migration, so the target was moving; the model can reply differently to the same request, so a difference in output was not necessarily a bug; and engineers could not read customer requests, which made it difficult to see where the two versions diverged.
Using production traffic as the test
Anthropic’s answer was to turn the production Messages API itself into a verifier. The new Rust service was tested against live traffic, differences were identified, and agents were dispatched automatically to fix them, under human review. That loop, the company said, allowed it to switch the API to Rust “without ever taking the service offline or freezing feature development.”
The Messages API was first written in Python in 2023, when that language was widely used inside the company for research code. At the start it was simple — “basically a request forwarder,” one engineer recalled — passing requests to the model and sending back the reply. Over time it became more tightly bound to logging, metrics, safety classifiers and shared Python libraries, which made a language change harder.
By late 2025, every request had to be validated, converted into a prompt, tokenised and screened by safety classifiers. As each reply arrived, the stream of tokens had to be sorted into text, thinking and tool calls. Python added overhead at each of those steps. Rust, the company said, allowed it to use far less CPU per request once the migration could be trusted.
A generator–verifier problem
The post frames the project as an example of a “generator–verifier gap”: it is often easier to check that a solution is correct than to produce one. Formal proof and the migration of well-tested codebases play to that gap. A live API, by contrast, is full of edge cases that sit outside the test suite, and there is no complete definition of “correct.”
As the system matured, engineers moved from running Claude themselves and chasing differences, to steering agents and reviewing fixes, and then to writing the rules and checks within which the agents worked. Changes were merged into the Rust code in two-week periods from April until public traffic moved across in September 2026, the company said. Not all of those changes were purely migration work; feature development continued in parallel.
The result, Anthropic says, is a production API that is cheaper to run and slightly quicker to start speaking, built with heavy use of its own model and checked against real traffic. The company is careful not to claim that the job was done without people. Human judgement, it said, was reserved for what counted as correct; how to get there was increasingly left to the agents. The post, written by Lance Martin, Jake Eaton, Arvin Aminpour, Emma Webb, Bharat Mediratta and Ravi Trivedi, presents the migration as a case study in how to trust a model with a live system — and in how much work is still required to check its answers.
