Anthropic Rebuilt Its Messages API in Rust, With Claude Writing the Code
Anthropic's platform team says it ported the API from a Python monolith without a single Rust developer at the start, verified it on shadow traffic, and cut CPU use by an estimated 40% to 50%.
Published
Last updated / Fact-checked on
Anthropic has fully rolled out a version of its Messages API rewritten in Rust, replacing what its platform team called a "very CPU inefficient" Python monolith. Claude wrote the code, the team said in an October 27 Latent Space interview, even though nobody on the team was a Rust developer when the project began.
AI-generated illustration created with Grok Imagine for DailyMech. Not a real photo.
What Anthropic said
The account comes from Latent Space's 107-minute interview with Katelyn Lesse, who leads engineering for the Claude Platform, and Angela Jiang, who leads product.
"As of last week, we fully rolled out the messages API, um, written in Rust," Lesse said, according to the episode transcript. Earlier in the year, she said, the team realized "we're going to hit a CPU wall." It had already gone multi-region, but was still "running this Python monolith," which was "very CPU inefficient."
Choosing Rust "was a crazy decision at the time," she said, because "we don't have a single Rust developer in the room."
| Item | What Anthropic said |
|---|---|
| Old system | A CPU-inefficient Python monolith |
| New system | The full Messages API in Rust, fully rolled out the week before the interview |
| Who wrote the code | Claude; humans designed the system |
| Verification | A full Rust fork run on shadow traffic, outputs compared with Python |
| CPU savings | "Somewhere like 40 to 50 percent," ballpark |
| Latency | 10% to 20% faster time to first token, higher on longer workloads |
Claude coded, humans designed
Lesse was clear that people still did the hard design work. "Claude is going to write the code. The humans like design the system," she said. "At the end of the day," it is "a distributed systems architecture." Claude also helped engineers "bounce around ideas and learn what they need to learn to design that system."
The two things that mattered most, she said, were "the plan to do the thing" and "the verification of the thing, because the actual implementation was like Claude writing code."
Anthropic has since hired a couple of people with more Rust experience, the speakers said.
Shadow traffic, then a gradual switch
Anthropic did not migrate one piece at a time. "We literally built like an entire fork of the entire API in Rust and then started running shadow traffic through it," Lesse said, checking that "the outputs that we were getting from the Python system and the Rust system were the same."
Normally, she said, a team would carve out parts of the system and migrate them one by one, "easily a multi-year effort." Instead, Anthropic ported the whole thing "and then just like slowly turn it on." "And it worked," she said.
The results
Asked about CPU savings, Lesse gave a "ballpark" figure of "somewhere like 40 to 50 percent." On latency, she said the team saw "somewhere between like 10 and 20 percent improvements on like time to first token specifically," with bigger gains on longer-running workloads.
These are Anthropic's own estimates, given in conversation. Anthropic has not published a methodology or benchmarks for them.
Why it matters
The project is a large real-world example of AI-written code replacing a core production service. The Messages API is the interface developers use to call Claude, so a rewrite carried real risk.
The process Anthropic described is what made it work: humans set the architecture, Claude wrote the code, and a full shadow-traffic comparison checked the results before real traffic moved over. Lesse said a team would never have attempted a one-shot port like this before agentic coding.
What engineering teams can take from it:
- Treat AI-assisted rewrites as a design and verification problem, not just a coding one.
- Run the new system on shadow traffic and compare outputs before cutting over.
- Measure CPU and latency yourself rather than relying on vendor estimates.
More coverage is on our Artificial Intelligence hub.
How we reported this
We reviewed the Latent Space episode page and its timestamps, and quoted the episode transcript as published by Steadcast. The transcript is automatic and does not label speakers; we attribute the Rust remarks to Katelyn Lesse based on 36Kr's account of the interview. Performance figures are Anthropic's estimates and were not independently tested.
Published and fact-checked October 30, 2026.
Sources
- Latent Space, "How Anthropic ships the #1 LLM in the World safely: Separating the Brain from the Hands," Oct. 27, 2026: https://latent.space/p/how_anthropic_ships_the_1_llm_in_the_world_safely_separating_the_brain_from_the_hands/
- Steadcast, episode transcript: https://steadcast.co/show/latent-space/how-anthropic-ships-the-1-llm-in-the-world-safely-separating-the-brain-from-the-hands
- 36Kr, "Anthropic Team Zero Rust Experience...": https://eu.36kr.com/en/p/4046323307205764
DailyMech used AI tools to help research and draft this article; it was fact-checked by our editors.