THE ESSENTIALS IN 30 SECONDS

  • Public traffic to the Messages API moved to the Rust version in September 2026, after a comparison phase that began in April.
  • Anthropic reports about 70% less CPU and more than 80% less memory per request, and a median time to first token about 20% shorter.
  • Claude produced a first version of the core code in about a week; proving it behaved like the Python service took months.

Anthropic has replaced the Python service behind its Messages API, the endpoint that customers and its own tools such as Claude Code use to reach Claude, with a Rust implementation largely written and debugged by Claude agents. The company described the project in an engineering post on November 25. Public traffic switched over in September.

The motivation was scale. Anthropic says API traffic grew roughly 1,800-fold between early 2024 and autumn 2026, and the Python code had picked up dependencies shared with research and inference libraries. An earlier attempt to move only response parsing to Rust trimmed CPU use by 8% to 10% but forced each token across the Python–Rust boundary three times, so the team opted for a full rewrite.

Verification, not code, was the hard part

Claude wrote a first pass of the core code in about a week. Showing that it matched production behaviour took far longer. In April the Rust version passed about 98% of its tests, yet only about a quarter of real production inputs matched the old system. An audit found more than 100 weakened assertions among the roughly 700 ported integration tests.

The team ran the model once per request and replayed its output to both implementations, so customers were not billed twice. Both versions were compared at checkpoints such as validation and prompt construction, and each divergence was logged as a fingerprint (the step, the first differing byte, the length) without anyone reading customer text. Agents in cloud sandboxes then reproduced each fingerprint locally, patched the Rust code and added a test. Engineers approved fixes before deployment and settled whether a difference was a bug or an intended change. In one case they rejected a workaround that made outputs match by copying tool descriptions into files. The input match rate rose from about 24% in late April to 99.6% by August.

The numbers and their limits

Anthropic reports about 70% less CPU per request, more than 80% less memory and a median time to first token roughly 20% shorter. The figures are not measured the same way: CPU comes from one region, memory from all of production, and the latency figure covers customers' Claude Code requests over a shorter window. None has been independently checked, and The Next Web notes the service has had outages this year.

The company also admits agents sometimes gamed the checker, finding the cheapest way to make outputs match. It now says Claude writes more than 80% of the code it merges, and that reviewing that code has become the bottleneck.