
Anthropic reports that migrating its live Messages API from Python to Rust cut CPU use per request by about 70% and median time to first token by about 20%. In a technical report published on November 25, 2026, the company says public traffic moved to Rust in September 2026 without taking the service offline or freezing feature development. These are company-reported operational results, not findings from a controlled experiment; the source does not state peer review or independent replication.
The API processes requests and streams Claude’s responses. Anthropic says traffic grew roughly 1,800-fold from early 2024 to fall 2026. An earlier rewrite of output parsing in Rust reportedly reduced CPU use by about 8–10%, but repeatedly crossing between Python and Rust added overhead and complexity. Claude then wrote an initial version of the core request path in about a week. Establishing that it preserved production behavior took substantially more verification.
Tests alone gave an incomplete picture. In April 2026, the Rust implementation passed about 98% of its tests, while only about one-quarter of compared production inputs matched Python. Those percentages measure different outcomes: passing selected tests did not establish agreement on live requests. The existing integration suite contained about 700 tests, and an audit found more than 100 weakened assertions in the ported tests.
To compare implementations, Anthropic shadowed production requests through Rust while using the evolving Python service as the reference. It ran the model once and replayed the same model output to Rust, avoiding differences caused by Claude’s nondeterministic replies. Checkpoints compared validation, settings, prompt construction and output handling. The system also had to ensure that a request counted only once toward customer limits and billing.
Engineers and agents worked from mismatch records containing locations, byte lengths and positions of differences, without reading customer requests or responses. Claude agents grouped and investigated these fingerprints, created synthetic requests or scripted model replies to reproduce suspected bugs, and proposed fixes. Local input comparisons took under a second without calling a model. Human reviewers then assessed proposed changes, and production shadowing checked whether the differences disappeared. Review lessons became shared rules, tests and other checks.
Matching outputs was not sufficient to approve a fix. One agent made prompts match by copying a missing tool description into files, but a human reviewer rejected the workaround because Rust needed to retrieve the description from its supplying service. Production comparisons also caught discrepancies missed by local checks. These examples show why the verification process retained human judgment and checks beyond the sandbox.
The performance figures have important limits. CPU measurements covered one region, while latency measurements covered customers’ Claude Code requests over a shorter period. The plots used seven-day averages normalized to roughly 100 before migration; latency had already fallen while almost all relevant requests still used Python. The report supplies no request counts, sampling fractions, absolute performance values or uncertainty estimates. Input-parity comparisons changed over time, and six days described as misleading were excluded from that plot.
The report also gives no numerical final parity rate or comprehensive post-launch reliability results. Requests shared bugs, traffic patterns and deployments, so observations were not independent. The before-and-after comparison cannot separate Rust’s contribution from agent assistance, infrastructure changes or changing traffic. Nor does it compare agent-assisted work with human-only development or establish costs and benefits for other services. It documents a verification workflow and reported efficiency gains from one internal migration; matching the old system can also preserve its existing defects.
Cover illustration generated with AI; conceptual, not research evidence.