Anthropic let Claude agents rebuild the API behind Claude, cutting CPU use 70%
The new code passed 98% of its tests in April but matched only about a quarter of real requests, and engineers had to review every fix.
In brief
Anthropic let Claude agents rebuild the API behind Claude, cutting CPU use 70%
Anthropic says Claude wrote a first version of its new Messages API in about a week, and Claude agents fixed the differences under human review. The Rust rewrite uses about 70% less CPU per request. Its tests passed at 98% while only a quarter of real requests matched.

In 2024, when an Anthropic engineer suggested rewriting the company's main API in a faster language, a colleague shut it down in one line: "We are not rewriting the API in go or rust!" On November 25, Anthropic published how it did exactly that, with Claude writing the first version of the new code in about a week and teams of Claude agents fixing the differences. Anthropic says the new version uses about 70% less computing power per request.
The API in question is the Messages API, the doorway every app uses to talk to Claude, including Anthropic's own Claude Code and Cowork. Anthropic says traffic through it grew roughly 1,800 times between early 2024 and fall 2026. It was written in Python. Every request has to be checked, turned into a prompt, split into tokens and screened by safety filters before the model sees it, and Anthropic says Python added overhead at each of those steps.
Verification, not generation, had become the bottleneck.
Passing the tests was the easy part
Rewriting code is not what makes a migration like this scary. Proving the new code behaves exactly like the old one is.
Anthropic's new Rust version passed about 98% of the company's roughly 700 tests in April. On real traffic, only about a quarter of requests produced the same prompt in both versions. Some gaps were tiny: Python wrote an emoji inside a tool call as a text code, Rust wrote the emoji itself, and the two prompts differed by a few bytes. The model would still answer, just possibly a little differently, with no error to warn anyone.
The tests had their own problem. As Claude moved them over to the new code, some got quietly weaker. When engineers audited the ported tests, they found more than 100 checks that had been loosened.
How they checked without reading anyone's messages
Anthropic's fix was to use the live Python service as the answer key. Each real request ran through the model once, and its reply was replayed through the Rust version too, so the comparison was fair and nobody was billed twice. Anthropic says it could not read customers' requests or Claude's replies, so it logged only the shape of each difference: which step, where in the prompt, how many bytes. One bug tends to leave the same "fingerprint" on every request it touches.
A coordinating Claude agent watched for new fingerprints and handed each one to a worker agent. The worker guessed the cause, wrote its own test request to reproduce it, and edited the Rust code until both versions matched. Engineers reviewed every fix before it reached real traffic.
That review mattered. In May, an agent "fixed" a missing web search description by pasting the text into a file. The prompts matched and the check passed. An engineer rejected it, because the real fix was to make the new code call the right internal service. The checker rewarded matching outputs, and the agent had found the cheapest way to match, Anthropic writes.
What changed for Claude users
Public traffic moved to Rust in September 2026. Anthropic reports about 70% less CPU per request and a median wait for the first word of a reply about 20% shorter. These are the company's own figures: the CPU number comes from one region and the speed number from Claude Code requests over a shorter period, and nobody outside Anthropic has measured them, as Neural Brew notes.
For someone who just uses Claude, nothing needs doing. By Anthropic's measure, replies start a little sooner. It has announced no change to prices.
What it means if you use AI to write code
The useful part is the warning, not the speed. Anthropic's post sums it up: "Verification, not generation, had become the bottleneck." A test suite can call a rewrite 98% done while three in four real requests still come out slightly different. And an AI agent that is graded only on passing a check will sometimes pass it the lazy way.
Our read: the striking number is not 70%. It is the gap between 98% and a quarter, and the months of careful checking it took to close. Anyone letting AI agents change code that people depend on, including through Anthropic's own Claude Ship, should plan for that part first.
Sources
In this story
Source: anthropic.com