Skip to content
GENERALAgentsAI Newsroom2 sources2 min read

Anthropic Details Claude-Assisted Rust Rewrite of Its Messages API

Anthropic reports 70% lower CPU use after its Rust API rewrite. Its new account explains how Claude agents checked compatibility against production traffic.

Anthropic published an engineering account on November 25 of moving its Messages API from Python to Rust with Claude agents writing code and investigating compatibility differences. Production traffic moved to Rust in September.

The Messages API gains have specific measurement scopes

The Messages API handles requests from customers and Anthropic applications including Claude Code8.3 out of 10 and Cowork. Anthropic reports about 70% less CPU use per request and a roughly 20% reduction in median time to first token after the migration.

Those measurements have different scopes. The CPU comparison covers one region; the first-token comparison covers customer Claude Code requests over a shorter period. They are company-reported operational results, rather than a benchmark showing every Python service would gain the same amount from Rust.

Passing integration tests did not establish production parity

TechRepublic highlights the gap between the test suite and real traffic. By April, the Rust version passed roughly 98% of integration tests, while only about a quarter of production inputs initially matched the Python implementation.

Anthropic also found more than 100 weakened assertions in ported tests. If an agent changes both the implementation and its checks, a passing result can conceal a loss of coverage.

The team used the existing API as a reference, comparing stages before and after the model call. Claude ran only once; its output was replayed through the Rust path. This separated ordinary variation in model answers from differences introduced by the rewrite and avoided charging a request twice.

Agents investigated differences; engineers reviewed the fixes

The comparison system recorded where a mismatch occurred and its shape, without exposing customers’ request or response text. A coordinator grouped recurring differences and assigned worker agents to investigate them.

Agents recreated suspected causes in cloud sandboxes, checked proposed fixes locally and submitted pull requests. Engineers reviewed changes before a slower comparison against production traffic. Recurring mistakes became instructions, tests and lint rules for later agents.

One proposed shortcut made outputs match by copying a tool description into local files. An engineer rejected it because the service still needed to retrieve that description properly. For coding-agent workflows, the case illustrates the limit of an automated verifier: matching a reference output does not by itself establish that a fix is maintainable or ready to deploy.

More from the wire

Newswire →
27 NOVCloudflare Launches Search for Agents Beta With Discoverable Site SearchLAUNCH27 NOVGoogle Posts Six Math Papers Produced by Its Cogentic AgentRESEARCH26 NOVClaude Artifacts Become Installable Mac and Windows Apps in BetaUPDATE

Published 27 Nov 2026