
The Library Media — Science, Technology & Health · AI News & Intelligence Desk
Verification, Not Generation: Anthropic Rebuilt the API Behind Every Claude Conversation in Rust — 70% Less CPU, No Downtime, and Agents Dispatched to Fix the Differences
By Catalina Clarke
Every conversation with Claude — every developer’s application, every session of Claude Code, every Cowork task — passes through one piece of software: the Messages API. This week Anthropic published the story of how it rebuilt that software, in a different programming language, while it was running, without ever taking it offline. The rebuilding was the easy part. Claude wrote the first working version of the new system’s core in about a week. The hard part, and the part that took the months, was proving the new system behaves exactly like the old one.
The Messages API was built in 2023, in Python, when it was little more than a forwarder: a request came in, the model answered, the answer went back. Between early 2024 and the fall of 2026, traffic through it grew roughly 1,800 times, on Anthropic’s own figures. By late 2025 every request had to be validated, converted into a prompt, tokenized and screened by safety classifiers before the model saw it, and every token of the reply sorted and streamed on the way out. Python was paying for all of that, on every request, billions of times.
The finished migration, according to Anthropic’s November 25 engineering post, uses about 70% less CPU per request and more than 80% less memory per request across production, and cuts median time to first token by about 20% — that latency figure charted on Claude Code requests. Public traffic had fully moved to the Rust service by September 2026. The service never went offline, and feature development on it never froze.
The company’s first attempt was the cautious one, and it failed on arithmetic. Engineers rewrote only the model-output parser in Rust and called it from Python. CPU use fell by about 8 to 10% — while every generated token crossed the boundary between the two languages three times. The gain did not justify the complexity, and the team committed to the full rewrite instead.
What changed their calculation was who would do the writing. By May 2026, Anthropic says, Claude was writing more than 80% of the code the company merged — a company-wide figure, not a figure for this project — and that dropped the cost of attempting the rewrite enough to try. Claude produced the first working version of the new request path in about a week. In Anthropic’s own framing, which is the spine of the whole post: “Verification, not generation, had become the bottleneck.”
Verification was hard for three reasons the post names plainly. Parity was a moving target: the Python API kept changing while the Rust version was being built against it. Model outputs are nondeterministic, so a difference between the two systems’ answers was not necessarily a bug. And the engineers could not read customer requests, so they could not simply look at where the two versions diverged.
Their answer was to turn the production API itself into the judge. They ran the model once, then replayed its output through both the Python and the Rust paths on shadowed production traffic — real requests, handled invisibly alongside the live service. Checkpoints in the code located each difference; fingerprints told genuine bugs apart from harmless variation. Then they automated the fixing: Claude agents were dispatched to investigate each difference and repair it. The post describes three nested loops — an inner loop of agents in sandboxes testing hypotheses in seconds on requests they wrote themselves, an outer loop checking fixes against the shadowed production traffic, and an outermost loop of prose, where every correction was saved as a rule in memory that later agents could read. By April 2026, the Rust API was passing approximately 98% of the integration tests.
The scope discipline matters, and Anthropic’s post mostly observes it: every figure here is the company’s own first-party measurement of its own system, published by the company that sells the model that did the work. No dollar saving is claimed in the post, and none should be inferred. This is one company’s migration, documented by itself. What generalizes is not the numbers but the shape of the work: when a model can produce a replacement system in a week, the engineering effort moves almost entirely into proving the replacement is faithful — building the oracle, the checkpoints and the loops that catch the differences a test suite never anticipated.
That inversion is the story underneath the story. Generation has become cheap. Verification has not. The teams that thrive with these tools will not be the ones that generate the most code; they will be the ones that build the best ways of knowing whether the code is right. Anthropic has now published, in unusual detail, what that looks like at production scale — on the very API its own products, and a good share of the industry building on Claude, run through every day.
Catalina Clarke
AI News & Intelligence Desk, The Library Media
From The Library — the estate of our family.
Follow Us
