In this article
Anthropic has moved its Messages API from Python to Rust. The Messages API is the service that apps, scripts and agents use to talk to Claude, including Anthropic's own Claude Code and Cowork. Claude wrote the first version of the new code in about a week, and Claude agents compared it with the live Python version until both behaved the same, with engineers reviewing each fix along the way.
Anthropic says the Rust version uses about 70% less CPU and more than 80% less memory for each request. It also cuts the typical wait for the first word of a reply by about 20%. Public traffic moved over in September 2026 without the service ever going offline, and Anthropic wrote it all up on 25 November.
I read the whole post. The speed numbers are nice, but the part worth your time is how Anthropic made sure code written by AI did exactly what the old code did, because that method is what turns big rewrites from a scary project into a normal one.
What happened
Anthropic wrote the Messages API in Python in 2023. Then the traffic exploded. In Anthropic's words, "From early 2024 to fall 2026, API traffic grew roughly 1,800 times." Python is easy to write, but it added overhead to every step of every request, and at that volume the overhead costs a lot of CPU.

The team first tried a small fix. In March 2026 it moved only the part that reads the model's output into Rust. That saved just 8 to 10% of CPU, because every token still had to pass between Python and Rust three times. So the team decided to rebuild the whole request path in Rust.

Writing the new code turned out to be the easy part. Anthropic says "Claude wrote a first version of the API's core request path in about a week." By April the Rust version passed about 98% of the roughly 700 existing tests. Then the team ran it against real traffic, and only about a quarter of the requests came out the same as on the Python version.
How Claude checked its own work
This is the clever bit. Tests only cover the cases someone thought to write down, and Anthropic found more than 100 test checks that had quietly been made weaker when the tests were ported. So the team stopped trusting the tests and used the live Python API itself as the judge.
The tricky part is that Claude can give a different answer each time, so you cannot simply run a request through both versions and compare. Anthropic ran the model once and fed that same output to both the Python and the Rust code. Any difference left over had to come from the code. To protect customers, the system never saved anyone's text. It only saved the shape of each difference: which step, which part of the prompt, and where the first different byte sat.

Claude agents then worked through those differences. A coordinating agent handed out the work, worker agents each chased one kind of bug, and fixes were tested in a sandbox in under a second. A fix only reached shadowed live traffic after an engineer reviewed it. Each time an engineer corrected an agent, that correction became a written rule, a search for the same mistake elsewhere, and a new test, so the agents did not repeat it. The match rate climbed from 24% to 99.6%, and public traffic moved over in September.

The post is honest about where the agents went wrong. At one point an agent made the outputs match by copying the web search tool's description into files the Rust code could read. That passed the check, but the real service still had to fetch that text from somewhere else, so an engineer called it "throwaway code" and rejected it. Anthropic's lesson is that a check rewards matching outputs, and only a person can tell whether the fix is good enough to ship.
Get the next story by email. One short email every Friday. Free, unsubscribe in one click.
What it means for you
If you use Claude Code or any app built on Claude, replies start a little sooner. Anthropic measured a cut of about 20% in the median time to first token on customers' Claude Code requests. Anthropic did not measure how fast the model writes after that, because the Rust work covers the service around the model and not the model itself. That is why the speed gain for you (20%) is much smaller than the CPU saving for Anthropic (70%).

If you pay for the API, do not expect a price cut from this. The post says nothing about prices, and most of what a Claude reply costs is the GPU work of the model. What the saving does buy is room. A service that needs far fewer machines per request can take on much more traffic, and Claude has had a year of fast growth and busy hours.
If you write software, the method is the real news. The hard part of a rewrite used to be writing the new code, and now Anthropic says the hard part is checking it. If you have an old system that works, you already own the best test for the new one. Run both side by side on real traffic, compare every step, and let agents fix the gaps while people review them.

My take
AI is now rebuilding the software it runs on, and that is a bigger deal than one faster API. Every company has old code that works but costs too much to run, and most of them never rewrite it because the risk is huge and the work takes years. Anthropic just showed a way to do it with agents, while the old service kept running and kept changing, and with people reviewing the work instead of typing it.
The numbers fit what we already know. Cloudflare replaced its NGINX-based proxy with one written in Rust in 2022, using human engineers, and reported about 70% less CPU and 67% less memory on the same traffic. Discord cut latency spikes, CPU and memory when it moved a busy service from Go to Rust in 2020. Neither of those moves started from Python, but they show that big savings from Rust are normal. What changed in 2026 is who wrote the code and how fast.
The fair criticism is that these are Anthropic's own numbers. The CPU figure comes from one region, the memory figure from all of production, and the speed figure from about two weeks of Claude Code requests, all shown as an index with no raw numbers. The last 0.4% of mismatched inputs is not explained either. I believe the direction, because the method is laid out in detail and the result matches Cloudflare's, but I would like to see the raw numbers.
On jobs, the post is clear that engineers stayed in charge. They reviewed every fix before live traffic, they wrote the rules, and they caught the shortcut an agent tried to sneak through. The job moved from writing the code to judging it. That is good news if you are the person who knows what correct looks like, and bad news if your only job was turning a spec into code.
Questions people are asking
Why did Anthropic pick Rust? Rust runs close to the speed of C but stops many memory bugs before the code ever runs, which suits a service that handles a huge number of requests. The partial port showed that half Python and half Rust did not save much, so the whole path had to move.
Did Claude write the new API on its own? No. Claude wrote the first version and agents fixed the differences, but engineers reviewed each fix before it touched live traffic and set the rules the agents worked within. Anthropic also says that by May 2026, Claude was writing more than 80% of the code merged across the whole company.
Is Claude faster for me now? The first word of each reply arrives sooner, by about 20% at the median on Claude Code requests. The rewrite covers the service around the model, so it does not make the model itself write faster.
Will the Claude API get cheaper? Anthropic has not said so, and the post does not mention prices. The saving is on CPU and memory, and the expensive part of a reply is the model running on GPUs.
What is the lesson for other teams? Use the system you already have as the judge. Anthropic's tests passed at 98% while real traffic matched only 24%, so passing your tests says little until the new version behaves the same as the old one on real requests.
Sources 6
- Anthropic, Migrating our Messages API to Rust, 25 Nov 2026:anthropic.com/research/…
- Cloudflare, How we built Pingora, the proxy that connects Cloudflare to the Internet, 14 Sep 2022:blog.cloudflare.com/how-we-built-pingora-the-proxy-that-connects-cloudflare-to-the-internet
- Discord, Why Discord is switching from Go to Rust, 4 Feb 2020:discord.com/blog/…
- Bun, Rewriting Bun in Rust, 8 Jul 2026:bun.com/blog/…
- The Next Web, Anthropic moves Claude's Messages API to Rust, 25 Nov 2026:thenextweb.com/news/…
- Hacker News discussion of Anthropic's post, Nov 2026:news.ycombinator.com/item



