The short version
- Anthropic rewrote its production Messages API in Rust despite having zero dedicated Rust developers on the team, as shared by Katelyn Lesse on the Latent Space podcast and highlighted by AI researcher Somi.
- Claude wrote the Rust implementation, while human engineers designed the migration plan and verified that old and new implementations matched on real traffic.
- Moving the Messages API to the Rust implementation reduced CPU utilization by 40% to 50%.
- The case challenges the classic software engineering maxim 'never do the big rewrite' by pairing AI code generation with strict real-traffic parity testing.
At a glance
| Target service | Anthropic Messages API |
|---|---|
| Target language | Rust (with zero dedicated Rust developers on the team) |
| Division of labor | Claude wrote the code; humans wrote the plan and verified real-traffic parity |
| Measured impact | 40% to 50% reduction in CPU utilization |
| Source attribution | Katelyn Lesse on the Latent Space podcast, summarized by Somi |
| Category | Dev & Open Source |
| Creator / publisher | Somi |
| Heat | 🔥 663.9K Heat |
| Announced | |
| Data updated |
Shipping a production Rust service with zero Rust specialists
Rewriting a high-throughput API in a systems language like Rust ordinarily requires either hiring experienced Rust specialists or spending months training an existing backend team on ownership rules, borrow checking, and async runtimes. According to remarks by Katelyn Lesse on the Latent Space podcast—later summarized by AI researcher Somi—Anthropic took a different route when overhauling its Messages API: the team completed a full Rust rewrite with zero dedicated Rust developers on staff.
Instead of treating unfamiliar syntax and compiler constraints as a staffing blocker, the team split the engineering work along a clear boundary. Claude wrote the Rust implementation code, while the human engineers focused on the system architecture, migration plan, and correctness harness. After deployment, CPU utilization on the Messages API dropped by 40% to 50%.
Human planning and real-traffic parity checks kept the migration safe
The decisive factor in making an AI-authored rewrite production-ready was not blind trust in generated code, but rigorous black-box verification. Human engineers authored the overarching design plan before Claude wrote the Rust modules, ensuring that request routing, serialization, and error semantics followed explicit specifications rather than ad-hoc prompts.
Once the Rust service was running, the team validated it by comparing the old implementation against the new Rust implementation on real traffic. Verifying that both versions produced matching behavior under actual production payloads allowed engineers who were not full-time Rust specialists to sign off on the cutover with confidence while capturing the 40% to 50% CPU savings.
- Code generation by Claude
Claude handled translating the service logic into idiomatic, memory-safe Rust without requiring dedicated Rust hires on the team.
- Architecture and planning by humans
Human engineers defined the migration plan, service boundaries, and rollout sequence before code generation began.
- Real-traffic shadow comparison
Engineers checked that outputs from the old implementation and the new Rust build matched on real traffic before completing the switch.
Why 'never do the big rewrite' is being reconsidered
For decades, one of software engineering's most durable warnings has been to avoid rewriting working production systems from scratch. Big rewrites traditionally stall because writing every module in a new language takes months or years, during which subtle edge-case regressions accumulate and requirements drift.
Anthropic's Messages API migration illustrates why that rule of thumb is being re-evaluated. When a frontier coding model compresses the time required to translate existing logic into Rust, and when an existing service already has live traffic that can be replayed or shadowed to prove exact behavioral equivalence, the cost-to-benefit ratio shifts sharply. Teams can harvest a 40% to 50% infrastructure efficiency gain without freezing product development for a year.
How to try it
Write an explicit migration plan first
Before asking a coding model to translate a service into Rust, have human engineers document the exact API contract, state transitions, and failure modes.
Use Claude to generate the target Rust modules
Delegate the language translation, struct definitions, and compiler-guided refactoring to Claude rather than blocking on language-specific hiring.
Verify old versus new on real traffic
Run real or mirrored production traffic through both the legacy service and the new Rust build, asserting that responses and side effects match.
Measure CPU and latency post-cutover
Track resource metrics during rollout to confirm expected efficiency gains—such as Anthropic's 40% to 50% CPU reduction—without behavioral regressions.
FAQ
How much CPU did Anthropic save by rewriting the Messages API in Rust?
CPU utilization dropped by 40% to 50% after replacing the previous implementation with the Rust version.
Did the Anthropic team have dedicated Rust developers for the rewrite?
No. According to the account from Katelyn Lesse on the Latent Space podcast, there were zero dedicated Rust developers on the team; Claude wrote the Rust code.
How did Anthropic make sure the Claude-written Rust code matched the old API?
Human engineers wrote the migration plan and verified that the old implementation and the new Rust service produced matching results on real traffic.
Why does this rewrite challenge conventional software engineering advice?
Traditional advice warns against big rewrites because manual translation is slow and error-prone. Combining AI code generation with real-traffic parity checking lowers implementation cost while keeping correctness verifiable.





