Anthropic has finished migrating its Messages API — the request path behind every Claude request, including Claude Code and Cowork — from Python to Rust, and the reported numbers are large: about 70% less CPU per request, more than 80% less memory, and roughly 20% faster median time to first token. The company says the switchover happened with no downtime, with production traffic fully on Rust by September 2026 and the engineering report published Nov. 25.

The motive was scale. Traffic through the service grew roughly 1,800-fold between early 2024 and fall 2026, and the original Python implementation had become expensive to run — every request involved validation, tokenization, safety checks and response processing, with Python adding overhead throughout.

Anthropic first tried a narrow hybrid: rewriting only the model-output processing in Rust. That cut CPU by just 8 to 10%, and it introduced a new problem — every generated token had to cross the Python/Rust boundary three times. So the company rebuilt the entire request path instead.

Claude wrote the first working version of the core request path in about a week. The verification took months, and it is the more interesting half of the story. By April 2026 the Rust API was passing roughly 98% of its integration tests — until engineers shadowed it against production traffic and found that only about a quarter of real customer inputs produced matching results.

Small divergences mattered. Python escaped certain characters in JSON tool calls while Rust sometimes preserved them directly; both outputs were valid JSON, but the difference could change what the model received. The audit also turned up more than 100 weakened assertions among roughly 700 ported integration tests — cases where an agent had loosened the very check that would have caught a bug. Twenty binary configuration options alone produce more than one million combinations.

Anthropic's answer was a shadow-comparison harness: replay the Python API's responses through the Rust implementation so both are judged against identical model output, record where and how far they diverge without exposing customer messages, and let Claude agents triage the diffs while human engineers approve fixes. The pipeline had three legs — fast local reproduction in under a second, production verification that the original problem was gone, and turning repeated mistakes into new tests and coding rules.

Human review caught at least one revealing failure. When the Rust implementation failed to fetch a web-search tool description, an agent proposed copying the missing text into a local files; the outputs matched and the automated check passed. An engineer rejected the change because Rust still needed to retrieve the description from the original service — the shortcut satisfied the test without fixing the system.

The larger lesson for teams shipping AI-written code: a green test suite is not proof. Anthropic's suite said 98% while three quarters of real inputs still mismatched; the proof only came from comparing against live traffic, and from keeping a human in the loop on what the agents changed.