Live updates
Anthropic rewrote Claude's Messages API in Rust, cutting CPU per request by about 70% and time to first token by about 20%
First seen on X 5 days ago@unusual_whales ♥ 2,130155 views
Anthropic has moved its Messages API, the main way customers and its own apps like Claude Code and Cowork reach Claude, from Python to Rust, cutting CPU use per request by about 70% and median time to first token by about 20%. According to an Anthropic engineering blog post published Nov 25, Claude wrote a first version of the core request path in about a week, and the switch happened on live traffic without taking the service offline or freezing feature work.
The hard part was verification, not code. The Rust version passed about 98% of its tests in April, yet only about a quarter of inputs matched on production traffic. Anthropic turned the live Python API into a verifier, shadowing real requests through both versions and dispatching agents to track down and fix the differences while engineers reviewed fixes and wrote the rules. API traffic grew roughly 1,800 times from early 2024 to fall 2026, and by May Claude was writing more than 80% of the code Anthropic merged. In 2024 one engineer had declared: "We are not rewriting the API in go or rust!"
Comments 0
Select a sentence in the story (long-press on phones) to comment on it.
“Anthropic says it cut CPU usage per request by about 70% and memory usage by more than 80% after migrating its Messages API from Python to Rust, with Claude writing much…”
