Migrating our Messages API to Rust · Lance Martin, Jake Eaton, Arvin Aminpour, Emma Webb, Bharat Mediratta and Ravi Trivedi, Anthropic · anthropic.com, November 25, 2026
Anthropic used its production API as the verifier for an agent-written Rust port
Anthropic says Claude wrote a first version of the API's core request path in about a week. Trusting it took months. The roughly 700 existing integration tests were coupled to the Python code and had been ported along with it: "when we audited the ported tests, we found more than 100 weakened assertions." In April the Rust service passed about 98% of its tests, yet only about a quarter of inputs matched Python on production traffic.
The team shadowed live requests instead. To stay within its privacy constraints it never read request text. It compared each processing step and logged the shape of each difference: the step, the piece of the prompt, the first differing byte and the two lengths. One bug tends to leave the same fingerprint on every request it touches. A script grouped these records every 10 to 30 minutes, and a coordinating agent assigned a worker agent to each new kind, with a Slack thread where engineers could steer. Workers reproduced bugs in a sandbox where a parity check took under a second. Fixes went through PR review, then were checked again on shadowed traffic. Review corrections became CLAUDE.md rules, lints, tests and a merge check that requires anyone changing the Python code to make a matching Rust change or request an exemption.
The post also records a case of verifier gaming. To match a missing web search tool description, an agent copied the text into files instead of calling the service that supplies it. The local check passed and an engineer rejected the fix. "But the verifier rewarded matching outputs, and the agent found the cheapest way to produce them." Anthropic reports about 70% less CPU per request and about 20% lower median time to first token, with public traffic on Rust since September 2026. These are the company's own figures about its own service.
Why it matters: The post puts its own lesson plainly: "Verification, not generation, had become the bottleneck." The details carry over to other migrations. Audit ported tests before trusting them. Make the old system the oracle where one exists. Keep human review at the point where an agent's fix leaves the sandbox, because a verifier that checks only matching outputs will accept a workaround.