Skip to content
Sign inSubscribe

Sections

  • News
  • Articles
  • Topics
  • Authors
  • Newsletter

Topics

  • Business
  • Regulation
  • Security
  • Infrastructure
  • Robotics
  • Work

Company

  • About
  • Contact
  • Privacy
  • Terms
  • Podcast

Newsletter

Daily AI news and weekly essays. Free, unsubscribe anytime.

Free. Unsubscribe anytime. Privacy


© 2026 ainews.today. Independent reporting and essays on artificial intelligence.

Agents

Anthropic rewrites its Messages API in Rust with Claude agents

Anthropic says the Rust version uses about 70% less CPU per request and was checked against live production traffic, with Claude agents fixing mismatches.

Eduard Mur·Nov 26, 2026

Summary

anthropic messages api rust
Anthropic CEO Dario Amodei speaking at TechCrunch Disrupt 2023 in San Francisco, September 2023. · Photo: TechCrunch / Wikimedia Commons, CC BY 2.0

In brief

  • Anthropic says the Rust API uses about 70% less CPU per request
  • Messages API traffic grew roughly 1,800 times from early 2024 to fall 2026
  • Rust version passed about 98% of tests in April but matched about a quarter of live inputs

Anthropic has moved its Messages API, the main way customers and its own apps such as Claude Code reach Claude, from Python to Rust, the company said on Wednesday in an engineering post.

The project tests whether coding agents, AI systems that run multi-step programming tasks on their own, can be trusted to rebuild live systems, where customers rely on edge cases and quirks that fall outside the test suite. Claude wrote a first version of the API's core request path in about a week, the company said, but proving that it behaved like the production service became the harder problem.

Anthropic said the Rust service uses about 70% less CPU per request and cuts median time to first token, the wait before a reply starts streaming, by about 20%. The company said it shipped without taking the API offline or freezing feature development. The performance figures are the company's own and have not been independently verified.

The rewrite was driven by load, according to Anthropic. API traffic grew roughly 1,800 times between early 2024 and fall 2026, and Python added overhead to every step of a request, from validating it and screening it with safety classifiers to sorting the model's output into text, thinking, and tool calls.

An earlier partial fix, rewriting only the output parser in Rust and calling it from Python, cut CPU use by about 8% to 10%, Anthropic said. The gain did not justify the added complexity, the company said, because each token, a unit of the model's output, then crossed between the two languages three times.

Tests alone could not settle whether the new version was correct. The Rust API passed about 98% of its tests in April, yet only about a quarter of inputs matched on production traffic, Anthropic said, and an audit of the ported integration tests found more than 100 weakened assertions, checks changed in ways that could let wrong code through. The company instead ran production requests through both versions and compared the results, a technique known as shadowing, and automatically dispatched Claude agents to fix the differences.

The comparison was complicated by a moving target. The Python API kept changing throughout the migration, Claude can answer the same request differently each time, and the company said its engineers could not read customer requests to see where the versions diverged.

Anthropic built the Messages API in Python in 2023, when one engineer called it “basically a request forwarder,” and in 2024 an engineer rejected a colleague's suggestion to move it to Go or Rust. By May 2026, Claude was writing more than 80% of the code Anthropic merged, the company said. Shadowing has precedent: GitHub released version 1.0 of Scientist, a tool that runs old and new code side by side on live data, in February 2016.

Topics

AgentsInfrastructure

Tags

AnthropicAI agentsRust

Eduard Mur

News editor
More by Eduard →

Get the next one in your inbox

Daily news and weekly essays, free.

Free. Unsubscribe anytime. Privacy

Related articles

All related articles →
An illuminated Nasdaq sign on a curved building front in Times Square at dusk, with blurred pedestrians crossing the street below
Business

Why Nvidia and other AI stocks fell in the week Anthropic went public

Nvidia beat forecasts and Anthropic raised a record $93.5 billion, yet AI shares sank as borrowing costs rose and Nvidia’s leadership crisis deepened.

Nov 21·9 min read
First-person view in Battlefield 1942 of a soldier holding a rifle on a sandy island with watchtowers and palm trees, shown inside a browser window
Regulation

Fans use Claude to port games to the browser, and publishers push back

Claude Opus 5.5 can turn a game’s machine code into a browser port in a day. Which ports stay online depends on what they ship and whose name they use.

Nov 15·10 min read
Mati Staniszewski, in a light shirt, smiles while looking to the right in a dimly lit room
Business

How ElevenLabs is turning its voice technology into enterprise software

Listeners rank its newest voice model first, by a narrow margin and at four times a rival’s price. The company now sells agents tuned on customers’ data.

Nov 15·8 min read

Back to home