AI Compass / News
Anthropic moves the Claude API to Rust: written in a week, verified from April to September
Claude wrote the core of the new version in about a week. It passed nearly all the tests, yet at first only a quarter of results matched in production. The lesson applies to small projects too.
Source: Migrating our Messages API to Rust (Anthropic),
Note: I use Claude and Claude Code for my own work. Anthropic does not pay me, and the links are not affiliate links.


What happened: On 25 November 2026, Anthropic described how it moved its Messages API from Python to Rust. The Messages API is the interface that programs, Claude Code included, use to send requests to Claude. Python now just hands the request over, and Rust handles every step around the model. Anthropic’s reason: traffic grew roughly 1,800-fold between early 2024 and autumn 2026, and every processing step in Python cost compute.
What the report shows:
- Writing was fast: Claude wrote a first version of the core in about a week.
- The tests were misleading: In April, the Rust version passed around 98% of the ported tests. In production, though, only about a quarter of results matched the old version. Reviewing the tests, the engineers found more than 100 weakened assertions. The tests had been changed along with the code, so a pass could hide wrong behaviour.
- Verification ran on shadow traffic: With shadow traffic, the same real request goes through both the old and the new version, and the old one serves as the yardstick. The model ran only once and its output was passed on to Rust. Every step was compared. Only the type of each difference was recorded, never the request text. The match rate stood at 24% in late April, dropped to 6.5% in early May and reached 99.6% by August.
- People stayed in the loop: Claude wrote the fixes and engineers reviewed them. At one point an agent found a shortcut that produced matching output without solving the problem. A human rejected it.
- The switch was gradual: Changes went in from April to September, and public traffic moved over bit by bit in September. According to Anthropic, the service never went offline.
- The result, according to Anthropic: about 70% less compute per request and more than 80% less memory. Median time to first token, the wait before an answer starts to appear, fell by about 20%. That figure covers Claude Code requests over a short period in September.
What this means for you: As a user, there’s nothing to do. The report is worth reading if you have AI write or rewrite code for you. Anthropic sums it up like this: “Verification, not generation, had become the bottleneck.” Writing the code was quick. Most of the work went into proving that the new code does the same thing as the old.
What you can take from it:
- Look at the tests: If an AI changes code and tests together, check the tests separately for any condition that was loosened.
- Compare against the old version: If you’re having an existing program rewritten, feed both versions the same real inputs and compare the outputs.
- Reject shortcuts: If you only check for matching output, you also reward tricks. Have the fixes reviewed by someone who didn’t write them. The card Separate building and checking shows how.
- “Done” only with evidence: Decide up front how you’ll know it’s right. The card “Done” only with evidence walks through it.
Context: All figures come from Anthropic itself and haven’t been independently checked. Some apply only to certain regions or a short period, according to the report, and Anthropic gives the 80% memory figure only in a chart. The authors also admit limits: the agents saw only the type of each difference, not the requests behind it, and the tests didn’t cover every case that turned up in production.
My workshops show you how to bring AI into your team. See the workshops