- Messages API moved from Python to Rust, cutting per-request CPU by about 70%
- API traffic grew roughly 1,800x since early 2024, driving the rewrite
- Claude drafted the first version in about a week, but proving behavioral parity was the real work
- Teams of Claude agents compared old and new services to find and fix differences
AI CURATED HOT STORY · 11/26/2026
Anthropic Migrates Messages API to Rust with Claude, Cutting CPU by 70%
Anthropic has migrated its core production Messages API from Python to Rust, reducing per-request CPU consumption by approximately 70%. The rewrite addresses a roughly 1,800x surge in API traffic since early 2024, significantly improving service efficiency and scalability.
Claude produced the first version of the Rust code in about a week, but the team emphasizes that the real challenge was verifying behavioral equivalence with the old service. They used the existing Python service as a reference and leveraged multiple Claude agents to automatically locate and fix discrepancies between the two versions, establishing a reusable paradigm for AI-assisted verification.
The migration not only demonstrates AI's potential for language rewrites of large, mature codebases but also highlights the practicality of the generation-verification gap framework: when verification is easier than generation, models can handle complex migration tasks. This offers the industry an efficient, low-risk path for service refactoring and is expected to encourage more enterprises to explore AI-driven engineering practices.
Hourly heat curve
68 fully observed hoursThe line compares only sources observed throughout; gap hours are interpolated to keep the trend continuous.
Coverage timeline
Total 3 reports · Latest first- Rohan Paul (@rohanpaul_ai)T2·78 pts
- Hacker News AIT2·78 pts
- Anthropic migrated its Messages API to Rust with Claude, without dedicated Rust engineers
- The generator-verifier gap explains feasibility: tasks where checking is easier than producing suit models
- Defining correctness in live systems beyond the test suite is the main risk in such migrations
- Anthropic AI (@AnthropicAI)T1·72 pts
- The Messages API was rewritten from Python to Rust, a language-level migration of a core production service
- The legacy service served as the reference baseline for validating the new implementation
- Teams of Claude agents automatically tracked down and fixed behavioral differences between versions