AI TrackerGet the app
← All news

Anthropic says it moved its Messages API from Python to Rust, with Claude agents checking the new service against the old

Anthropic says it migrated its Messages API, the main way customers and its own apps such as Claude Code and Cowork reach Claude, from Python to Rust. In a post on its engineering blog it says the Rust service uses about 70% less CPU per request and cuts median time to first token by about 20%, and that the move happened without taking the service offline or freezing feature development. These figures are Anthropic's own.

What the post describes:

  • Why: API traffic grew roughly 1,800 times from early 2024 to fall 2026. Rewriting only the output parser in Rust cut CPU by about 8–10%, which Anthropic judged not worth the added complexity. Claude wrote a first version of the core request path in about a week.
  • Verification: the existing integration tests were not enough. The Rust API passed about 98% of them in April but matched Python on only about a quarter of production inputs. Anthropic ran the production API as the reference, ran the model once and replayed its output to Rust, and compared each stage before and after the model call. To protect user privacy it recorded only the shape of each difference, not request text.
  • Agents: a coordinating Claude agent assigned worker agents to each new kind of difference. They tested fixes in a sandbox, engineers reviewed the proposed fixes, and shadowed live traffic confirmed whether a difference was gone. Anthropic says it found more than 100 weakened assertions in tests that had been ported with Claude's help, and that one agent's shortcut was rejected in review.

Anthropic's post on X had about 900 likes the day it went up.

Get news like this as a push.

AI Tracker alerts you when something changes for the tools you use.

Get the app