Anthropic has moved its Messages API, the main way customers and its own apps reach Claude, from Python to Rust. The company says the new version uses about 70% less CPU per request and cuts median time to first token by about 20%. Anthropic described the work in a research post dated Nov 25, 2026, and says the service never went offline and feature development never froze.

The post is less a victory lap than a method: how a team proves that a rewritten live system behaves exactly like the one it replaces. That matters to any company weighing a large migration.

Why did Anthropic rewrite the Messages API?

Traffic outgrew the original design. Anthropic says it built the API in 2023 in Python, and that from early 2024 to fall 2026 its API traffic grew roughly 1,800 times. By late 2025 every request had to be validated, converted into a prompt, tokenized and screened by safety classifiers, and each reply had to be sorted into text, thinking and tool calls as it streamed back. The company says Python added overhead at each of those steps.

The team first tried a smaller fix. It rewrote only the code that parses model output in Rust and called it from Python, which cut CPU use by about 8% to 10%. Each token then crossed between the two languages three times, and Anthropic judged the gain too small for the added complexity. Claude wrote a first version of the core request path in about a week, so the company chose a full migration instead.

How did Anthropic check the new version was correct?

Existing tests were not enough. The company had about 700 integration tests, but they were tied to the Python code, and an audit of the ported tests found more than 100 weakened assertions. The Rust version passed about 98% of its tests in April, yet only about a quarter of inputs matched on production traffic.

So the team used the live API as the reference. Because Claude can reply differently to the same input, it ran the model once and replayed that output to the Rust version, then compared each step before and after the model call. To protect privacy it did not read customer requests or replies. It logged only the shape of each difference, such as where it happened and how large it was.

A script grouped those records every 10 to 30 minutes, and a coordinating Claude agent assigned a worker agent to each new kind of difference. The loop worked in three layers:

  • An inner loop in a cloud sandbox, where agents tested fixes in seconds against both codebases
  • An outer loop that checked each reviewed fix on shadowed production traffic
  • A memory loop that saved engineers’ corrections as rules, tests and lint checks

Humans stayed in the loop at review. In one case an agent copied a web search tool description into files Rust could read, and an engineer rejected it because Rust would still need to call the service that supplies it. Public traffic moved to Rust in September 2026.

What did Anthropic say before the post?

Earlier figures were lower. In an interview relayed by explainx.ai and 36Kr, Katelyn Lesse, who runs platform engineering at Anthropic, put the CPU saving at about 40 to 50 percent and the time to first token gain at 10 to 20 percent, in an account published in October. The November post gives the higher 70% CPU figure with methodology, and explainx.ai updated its own article to point readers to it.

Prices

Anthropic’s post lists no price and announces no new plan, so nothing in it says API costs change. Anyone who pays for the Messages API should read prices on Anthropic’s own pricing pages rather than assume the CPU saving reaches the bill.

Who it suits

API developers. Anthropic says median time to first token fell by about 20%, measured on customers’ Claude Code requests over a shorter period, so expect faster first words rather than a different model.

Engineering leads weighing a rewrite. The post’s central lesson is that checking results, not writing code, is now the slow part, and that a production system can act as its own checker.

Privacy minded teams. Anthropic says it compared requests without reading them, recording only where and how much two versions differed.

Who should be careful. The numbers come from Anthropic alone. Its chart notes the CPU figure covers one region, while memory covers all of production.

What is still unknown

Anthropic has not published per customer latency numbers or an independent test of the Rust service. It also does not say whether the CPU saving will lead to lower prices or higher limits.

The full post, with its diagrams of the three loops, is on Anthropic’s research page, and the Messages API documentation shows how the endpoint is used today.