Anthropic says Claude wrote its Rust Messages API, and checking it took longer
Anthropic says Claude wrote the Rust version of its Messages API in about a week, but proving it matched the old one was the real task.
The short version
- Anthropic says the Rust API uses about 70% less CPU per request and 80% less memory.
- The team had about 700 integration tests but found them inadequate.
- Anthropic says Claude wrote more than 80% of merged code by May 2026.
- The inner loop took less than a second per request.
- Memory note: When an engineer turned down a web search shortcut, the agent saved a note explaining the decision, the reason, and the correct fix.
What Anthropic says it did
Claude wrote the new Rust code for Anthropic's Messages API in about a week, the company says. Then the real work began: showing the new system behaved like the old Python one.
InfoWorld reports that Anthropic moved its Messages API from Python to Rust with no downtime. The company says the new version uses about 70% less CPU per request and 80% less memory. It also says median time to first token fell by about 20%.
Anthropic says this happened without taking the service offline or freezing feature development. Its engineering team described the project in a new blog post and said it shows production systems can be migrated with Claude in this way.
Why it matters
If you build on Claude through the Messages API, Anthropic says the move to Rust happened without taking the API offline. The figures on CPU, memory and time to first token come from the company itself.
Why the Python service strained
The Anthropic team launched the Messages API in 2023 as a simple Python "request forwarder." Customers and Anthropic's own internal apps use it as the primary way to reach Claude. The engineers say API traffic grew by more than 1,800 times from early 2024 to fall 2026.
By late 2025, each request went through several steps. It was checked, built into a prompt, broken into tokens and screened by safety classifiers. Replies came back as tokens that had to be sorted into text, thinking and tool calls. Python added overhead to every one of those steps.
Why a rewrite came late
The team first rewrote only the parts slowing the system down. The gains in CPU use did not justify the added complexity of rewriting code, the report says. By May 2026, Claude was writing more than 80% of the code Anthropic merged, which lowered the barrier to a full migration.
The biggest issue was verification. Claude's results can be hard to check in live environments because of constant Python changes, privacy limits and nondeterministic replies. The engineers wrote that verification, not generation, had become the bottleneck.
From testing to shadowing
Anthropic had about 700 existing integration tests. The team found them inadequate, since they were incomplete and tied to Python implementations, so some tests were passed incorrectly. They switched to shadowing, which runs requests through both old and new code and compares the results.
Each difference produced a small record of what differed and where, with no customer content. An agent then reconciled it. A single bug could produce hundreds of thousands of nearly identical diff records, without compromising user privacy.
Inner, outer and memory loops for agents
The fast inner loop gave agents a sandbox to test ideas, propose fixes and fail safely. It took less than a second. The slower outer loop checked fixes in production by comparing Rust API deployments with and without each fix.
The engineers wrote that the inner loop was quick but imperfect, because agents could only test requests they had written. A memory loop recorded human reviewers' feedback and the agents' work, then applied it to every agent that followed. In the engineers' words, the inner and outer loops fixed one difference at a time, and the memory loop improved how agents made those fixes.
A small detail: The report does not say how many agents ran, or how long the full migration took beyond Claude's week of writing code.
Lessons the engineers list
The engineers say the constraint is now verifying results rather than writing code. When tests are not enough, they say, a production system can act as a verifier. They built a signal where checkpoints located each difference in the code and fingerprints told one bug from another.
Humans put judgment only into what counted as correct. Engineers first worked inside the inner loop, then moved to the seam between loops, steering agents and reviewing fixes in Slack. Later they moved to the edge, writing rules and checks.
The questions people ask
What it means for you
A developer who calls the Messages API can note that Anthropic's engineering team says the move came without taking the API offline. The report does not say how it changes any customer's bill.
Who gains
Anthropic says the Rust version is lighter on CPU and memory and faster to first token. Its engineers say verification, not code writing, is now the hard part.
How solid is it
Mixed. The numbers come from Anthropic's own blog post, as reported by InfoWorld. The report does not mention any outside test.
What you can do
Treat the performance figures as the company's own claims for now. Teams planning a rewrite can study the inner, outer and memory loops described here.
What to watch
- How well does the production-as-verifier method work for other companies' systems?
- How much human review will the loops need as Claude grows more capable?
More stories
ToolsNadella says IDEs faded after Anthropic launched Claude Code, as VS Code changes
ToolsAnthropic's Claude suffers outage, citing authentication failures when processing code
ToolsSendPulse lists its MCP server on the Claude marketplace on Anthropic IPO day
ToolsTogether open-sources Hurdle to test how coding agents use your API
ToolsWhat happens when Anthropic lets AI agents approve each other's code, and one review never ends?
Get The Daily
AI news, explained in 5 minutes a day. Free. The first issue is coming soon.
No password. Unsubscribe any time. Privacy
Say why
Liked it? Say why
Add a line for other readers.
No account needed. We never show your email. Comments with links, ads or abuse are held and not shown. Your comment shows after a quick check.
Sources
The reporting and documents this story is built from. Each link opens the original.
- OfficialAnthropic blog post anthropic.com
- OfficialAnthropic page anthropic.com
- ReportingInfoWorld: the article we sourced infoworld.com
Written with AI by the SI Agent News Desk from the reporting above. Every number is checked against it.Spot a mistake? Corrections.
