98% of Tests Passed. Only 25% of Real Traffic Matched.
Anthropic moved the API behind Claude from Python to Rust. The post went up on November 25. The headline numbers are big. CPU per request fell about 70%. Memory per request fell more than 80%. Median time to first token fell about 20%. The service never went offline. There was no feature freeze either.
But the numbers are not the interesting part. The interesting part is what broke along the way.
The Messages API is the front door to Claude. It serves paying API customers. It also serves Anthropic's own apps, Claude Code and Cowork. Traffic through it grew about 1,800 times between early 2024 and fall 2026. Python could not keep up at that scale. Rust could.
Claude wrote the first version of the new core request path in about a week. That sounds like the story. It is not the story. By May 2026, Claude was already writing more than 80% of the code Anthropic merged. Writing code had stopped being the hard part. Proving the new code behaved exactly like the old code was the hard part.
Anthropic tried the obvious checks first. By April 2026, the Rust version passed about 98% of roughly 700 integration tests. That looks like a pass. Then they ran real production traffic through it. Only about a quarter of real inputs produced an identical prompt. The tests said yes. The traffic said no.
Passing tests vs matching real trafficData from the sources listed below.
Three things made parity hard. The Python API kept changing while the migration ran, so the target moved. Claude answers the same request differently each time, so a difference between two outputs did not always mean a bug. And Anthropic could not read customer requests, so they could not see where the two versions diverged.
Their fix was simple to describe and hard to build. They turned the live Python API into the verifier. The same request went to both versions. Checkpoints located each difference in the code. Fingerprints told one bug from another. Claude agents ran in loops. The fast inner loop tested ideas in sandboxes in seconds. The slower outer loop checked fixes on shadowed production traffic. The outermost loop was plain prose, rules saved in memory for the next agent.
Public traffic moved to Rust in September 2026. The earlier shortcut had failed. Anthropic once tried a Rust parser called from Python. It cut CPU by only 8% to 10%, and each token crossed the language boundary three times. The full rewrite was the only move that paid.
I read this as a warning about how we judge agent-written code. A green test suite is not proof. Tests cover the cases someone thought to write. Production traffic covers the cases nobody thought of. If you let an agent rewrite a system, budget more time for the verifier than for the rewrite. The verifier is the product. The code is the easy part.
That is the lesson I would take into my own work. Build the oracle first. Run both versions side by side. Diff everything. Only then trust the green checkmarks.
Try this
Run the same input through two implementations and diff the output. That is the whole parity trick, shrunk to one command.
bashecho "hello world" | python3 -c "import sys,hashlib; print(hashlib.sha256(sys.stdin.read().strip().encode()).hexdigest())" > /tmp/py.txt echo "hello world" | sha256sum | cut -d' ' -f1 > /tmp/sha.txt diff /tmp/py.txt /tmp/sha.txt && echo "parity: match"
Now feel the speed gap yourself, if you have rustc installed:
bashcat > /tmp/loop.rs <<'EOF' fn main() { let s: u64 = (0..1_000_000).sum(); println!("{}", s); } EOF rustc -O /tmp/loop.rs -o /tmp/loop && time /tmp/loop python3 -c "import time; t=time.time(); print(sum(range(1_000_000)), round(time.time()-t, 3))"
