Sunday, November 29, 2026 Independent reporting on artificial intelligence Newsletter
AI News Beats
AI Companies

Anthropic says its Rust migration cut CPU use on the Claude API

The company says its Messages API now uses about 70 percent less CPU per request and starts streaming replies faster after a migration from Python.

Network connectors plug into a switch inside a server rack
Photo: Brett Sayles / Pexels

Anthropic said on November 25 that moving the software behind its Messages API from Python to Rust reduced CPU use per request by about 70 percent. It also reported a roughly 20 percent reduction in the median time to the first token, the first small piece of a streamed response. The migration changed how the service handles incoming requests and streams replies, not which Claude model produces the answer.

The company said it completed the traffic migration in September without taking the API offline or freezing new feature work. These are Anthropic’s measurements of its own service, not a comparison with other providers or a promise that any particular application will speed up by the same amount. For a user watching an interface, a quicker first token concerns when the answer starts appearing. It does not say how long the entire answer takes to finish.

Why checking the rewrite was difficult

Anthropic said its API originally did little more than forward requests to the model. It now performs work such as checking request structure and turning incoming data into the form that model infrastructure expects. The service also separates parts of a streaming response, such as visible text and calls to tools. Changes in that layer can break an integration even if the underlying model still works.

A simple comparison of text answers would not establish that the new implementation behaved correctly. The same request can produce different model responses on separate runs. Meanwhile the production Python service continued to change, so a rewrite tested once against an older copy could fall behind even before it shipped.

The company describes using the running Python implementation as a reference for the Rust version, comparing relevant behavior on production traffic. That gave engineers and coding agents a way to investigate differences without treating every change in generated words as a software defect. Anthropic also said its process had to work without the team reading customer requests, a constraint that made debugging mismatches harder.

What the result does and does not show

A lower CPU cost for request handling is different from a lower cost to run the AI model itself. The processors that prepare and route requests do not do all the work of generating the text. Anthropic did not announce a new API price or say the change improves the quality of Claude’s answers. It showed that a part of the system users rarely see can make a measurable difference to responsiveness.

For businesses moving a service from one programming language to another, the useful point is how the team defined success. An implementation is ready when the observable behavior that customers depend on stays consistent, not merely when the new code builds or passes its own unit tests. Latency measurements and compatibility checks address different risks. Shortening the median wait does not mean every request got faster, just as matching one example response cannot rule out problems with an unusual tool call or streaming format.

Stay on top of AI

Get the stories that matter in artificial intelligence, straight to your inbox.

Free. One email with the stories that matter. Unsubscribe any time. See our privacy policy.