Research Published here Reported by Anthropic on

Anthropic rewrote its Messages API in Rust using production as the test oracle — and says verification is now the bottleneck

Anthropic published an account on November 25 of migrating the Messages API from Python to Rust, finished in September 2026 with no downtime and no feature freeze. The headline numbers: about 70% less CPU per request, more than 80% less memory per request, and median time to first token down about 20%, against API traffic that grew roughly 1,800 times from early 2024 to autumn 2026. The method is the substance. Rather than write tests, the team "turned the production Messages API itself into a verifier," replaying live traffic through both implementations and comparing. Two techniques made that tractable. Checkpointing compared results at each stage — validation, prompt building, tokenization — rather than only at the output, so a divergence came with a location. Fingerprinting categorized each difference by position in the prompt, length delta, and affected component, which collapsed thousands of individual failures into recognizable classes. Privacy constrained the whole exercise: engineers and agents worked without reading user requests or Claude's replies, recording only the step, the piece, both lengths, and the first differing byte — "no text." Only around 24% of production inputs matched between the two implementations at the start, partly from mundane causes like Python and Rust escaping emoji differently in JSON. Fixes ran in three nested loops: an inner loop of seconds where Claude agents hypothesized a root cause from a fingerprint, reconstructed a triggering test case, and proposed a patch in a local sandbox; an outer loop of hours to days validating against shadowed production traffic; and a memory loop encoding each lesson as a reusable rule. By late June agents were writing more than 80% of the code, and by around August merged changes exceeded 3,000 per two-week period. An audit of the existing Python test suite found more than 100 weakened assertions coupled to the old implementation, and exhaustively testing feature combinations was infeasible — the post cites 12 days of tests for a single model. The stated conclusion is that "verification is the new bottleneck" rather than code generation.

Why it matters

The 24% initial match rate is the number to sit with, because it is the most honest thing anyone has published about agent-driven migration. Three quarters of production inputs produced different output at the start, and none of that surfaced from a test suite — it surfaced from running both versions against real traffic. That is the gap between "the tests pass" and "it behaves identically," and the audit finding over 100 weakened assertions explains why the tests could not have caught it: a suite written against an implementation encodes that implementation's quirks as expectations. If you are planning any agent-driven rewrite, the lesson is not that Claude wrote the Rust — it is that the Rust was only trustworthy because something unarguable compared it to the thing it replaced. Fingerprinting is the transferable trick and it solves the actual problem with high-volume agent debugging: an agent handed one failure fixes one bug, while an agent handed a failure class fixes a category, and the difference is the only reason 3,000 merged changes per fortnight is survivable. The privacy constraint turned out to be a feature rather than a tax, because recording a structural signature instead of the payload is what let agents work on production bugs at all, and most teams would reflexively have asked for log access instead. Read "verification is the new bottleneck" as the industry statement it is: this is the second week running — after METR's judge-bias finding and the agent-swarm oversight audit — that the constraint on agent work has been measurement, not capability.

What to do

Build a differential verifier before you let agents rewrite anything that matters: run old and new side by side on real traffic and compare, because your test suite is coupled to the implementation you are replacing and will tell you everything is fine. Checkpoint the comparison at every internal stage rather than only at the output, since a divergence with a location is a bug an agent can fix and a divergence at the boundary is a mystery. Fingerprint failures into classes — component, position, magnitude — and hand agents the class, as that is the difference between fixing bugs one at a time and fixing them by category. Record structural signatures instead of payloads so your agents can work on production divergences without anyone reading user data; "step, piece, both lengths, first differing byte" is a complete recipe and it is cheaper to implement than a log-access review. Audit your own test suite for assertions that were weakened to make a legacy implementation pass, because those are precisely the properties a rewrite will break silently. And budget for verification rather than generation when you plan this work — the code was never the expensive part here.

Tags: Anthropic Agents Coding Evaluation

More from November 26, 2026

All AI news