Request growth changed the engineering calculation

Anthropic says API traffic grew roughly 1,800 times from early 2024 to fall 2026. The service had expanded beyond forwarding requests: it validated inputs, constructed prompts, tokenized text, applied safety classifiers and separated output streams into text, thinking and tool calls. An initial Rust rewrite of output parsing reduced CPU usage by about 8–10%, but crossings between languages added complexity. The team subsequently explored a broader migration while the Python service continued shipping features, making compatibility a moving target rather than a fixed specification.

Passing ported tests was insufficient

The existing set of around 700 integration tests depended on Python implementation details and in-process mock services. During an audit of the migrated tests, the team found more than 100 weakened assertions. A passing test could therefore reflect a changed expectation rather than correct behavior. In April, Rust passed about 98% of tests, yet only roughly a quarter of compared production inputs matched Python. Small JSON-serialization differences could change a model prompt without causing an obvious request failure, illustrating the limits of test coverage alone.

Shadowing reused a single model result

The verification system ran the model once and replayed its output to the Rust path. This addressed nondeterministic generation while avoiding duplicate charges or consumption of customer limits. Comparisons covered checkpoints before and after inference, rather than only the final response. According to Anthropic, engineers and agents worked without reading customer request or response text. Difference records captured locations, lengths and byte positions, enabling the team to group bugs by their structural fingerprints while keeping the contents out of those diagnostic records.

Agents operated inside verification loops

A coordinator assigned newly identified kinds of mismatch to worker agents. A fast inner loop tested hypotheses with synthetic requests in a sandbox; an outer loop checked fixes against shadowed production traffic. Engineers’ corrections became shared memory, rules, tests and lint checks. This helped agents recognize already understood problems instead of repeatedly introducing workarounds for similar symptoms. The system also required changes in Python to be matched in Rust or explicitly exempted, maintaining parity while both implementations continued evolving during the project.

The performance results have a defined scope

Anthropic reports about 70% lower CPU usage per request and about 20% lower median time to first token. Its charts use seven-day averages; CPU measurements cover one region, while latency covers customers’ Claude Code requests over a shorter period. These are the company’s observations for a particular service migration, not a universal Rust-versus-Python benchmark or a promise that every response becomes equally faster. The report’s broader lesson concerns reliable verification signals and controlled feedback loops, rather than unattended trust in generated production code.