Executive Summary
Anthropic moved its Messages API from Python to Rust and reports about 70 percent less CPU per request and a 20 percent faster median time to first token. The performance result is not the interesting part. The migration worked because Anthropic turned production traffic into the test harness, ran both versions on live requests, and dispatched agents to fix every divergence it exposed.
The two numbers that matter for anyone planning a rewrite are 98 and 25. In April the Rust API passed about 98 percent of its own tests while only about a quarter of shadowed production inputs produced a matching result. Parity reached 99.6 percent by August. Writing the code took a week. Proving it took months, and the proof needed a human at the merge gate, because a verifier can confirm that two outputs agree without confirming the fix is shippable. Budget verification capacity before starting a migration this size.
Anthropic’s Messages API is the road every Claude request travels, from paying customers and from its own apps. It shipped in 2023 as a Python service one engineer called basically a request forwarder. Traffic grew roughly 1,800 times between early 2024 and fall 2026. Anthropic published the account on 25 November.
GPU capacity gets the attention. The layer around the model does the other work. It validates every request, builds the prompt, tokenizes it, runs the safety classifiers, sorts returned tokens into text and tool calls, and counts usage for billing. That is where request cost lands, and Anthropic wrote it again in Rust.
Shadow traffic found what the suite missed
Claude wrote a first version of the core request path in about a week. Winning trust in it took the rest of the year.
Anthropic chose shadowing. Every request ran through both services, with the model called once and its reply replayed to the Rust version, so model randomness could not pass for a bug. In April the Rust API passed about 98 percent of its tests while about a quarter of shadowed production inputs matched. Bun had an independent suite in a second language to judge its own port. Most services do not.
The difference was edge cases nobody wrote down. Python escapes certain characters inside tool calls, an emoji for example, as text codes. Rust wrote them as they arrived, the prompt diverged, and the model answered slightly differently.
Engineers could not read customer requests, so comparisons recorded shape instead of text. One bug leaves the same fingerprint on every request it touches, which made mismatches sortable.

A verifier rewards matching, not shippability
Agents did most of the repair. An orchestrator collected mismatches every 10 to 30 minutes and handed them out. Each worker wrote a request that reproduced the difference, edited code until the versions agreed, and added a test. Merges went past a human.
One web search bug made the case. Production pulled a tool description from an internal service Rust could not call yet. An agent proposed copying the text into files Rust could read, the prompts matched, and the verifier passed. An engineer rejected it, because Rust would still need that service before launch and the workaround would be thrown away.
Anthropic’s own sentence is the lesson. A verifier can tell an agent whether the outputs matched, but not whether the fix is good enough to ship. The agent wrote a memory note about the rejection, and later agents linked fresh mismatches to the known bug instead of re-proposing the shortcut. By May 2026 Claude wrote more than 80 percent of the code Anthropic merged.
Matching inputs climbed to 99.6 percent by August. Public traffic moved to Rust in September 2026.
The CPU saving is the smaller story
The payoff is about 70 percent less CPU per request and a median time to first token about 20 percent faster, with the service never offline and feature work never paused.
The cheap version came first. In March 2026 Anthropic moved only response parsing to Rust, which cut CPU about 8 to 10 percent, and every token then crossed between languages three times. The complexity did not pay. The full rewrite did.
For anyone running inference, this changes the cost argument. The expensive resource in a serving stack is not only the accelerator. It is the CPU wrapper around it, and that wrapper is Python in a lot of shops because the model tooling lives there. A 70 percent cut there buys headroom the GPU invoice cannot, the same way a cache shortage looked like a GPU shortage until somebody read the latency curve.
Three questions before your next rewrite. What is your shadow comparison, and does it run against real traffic rather than fixtures? Who holds merge authority when an agent’s fix passes every check but solves the wrong problem? And can you size the CPU you spend outside the model, because that is where the next 70 percent hides? The Anthropic Rust API migration is the clearest account yet.
Related reading. A proof that compiles is not yet a proof we understand covers the same split between generating and verifying. The gVisor speedup is another win that sat below the obvious suspect.
Get the next one before it is old news
Independent analysis of cloud-native infrastructure, Kubernetes and data center economics. No vendor spin.




