Specimen No. 1228 · Habitat H5 · Rust

Anthropic ported the Claude Messages API from Python to Rust, with Claude writing the code

On Latent Space, Claude Platform leads describe a full Rust fork checked with shadow traffic. Ballpark: 40 to 50% less CPU, 10 to 20% faster first token.

WILDNESS3 / 5 · PARTLY TAMED
Verified: Latent Space episode of 27 Oct, transcript read 31 Oct 2026 (chapter 56:05).Only claimed: CPU and latency figures are spoken ballparks, not a published benchmark. No crates or code shown.
Two matching cut-paper panels, one sand and one rust-red, with a cream paper ribbon falling between them and a small coral slider on the rust-red side.
Generated cover art. Not a photo.

Anthropic has rewritten the Claude Messages API, the endpoint most Claude integrations call, from Python to Rust. Katelyn Lesse, who leads engineering on the Claude Platform, and Angela Jiang, who leads product, described the work on the Latent Space podcast published on 27 October. The part that spread on social media is how it was done: Claude wrote the code, and the team proved it right by replaying real traffic.

Why they moved

In the episode transcript, the Messages API of about a year ago is described as “a Python monolith” running in a single Google Cloud region. Usage grew, the team went multi-region, and by early this year they expected to “hit a CPU wall”. The Python service, in their words, was “very CPU inefficient”.

They chose Rust even though, at the start, “we don’t have a single Rust developer in the room”. The episode adds that they have since hired a couple of people with more Rust experience, so the team is no longer Rust-free.

How the port worked

The division of labor they describe: “Claude is going to write the code. The humans design the system.” The two things that mattered most, they say, were the plan and the verification.

  • A full fork. They built an entire copy of the API in Rust rather than migrating it one piece at a time.
  • Shadow traffic. Real requests were also sent to the Rust system, and its outputs were compared with the Python system’s. Then they slowly turned the Rust system on.
  • A pure port. The small team doing the work added no new features, while the rest of the API team kept shipping in Python. Static analysis flagged any new Python feature that had no Rust counterpart.

Without coding agents, they say, this would have been a multi-year, piece-by-piece migration.

The numbers, and how firm they are

Asked for results, the answer was explicitly a ballpark: CPU savings of “somewhere like 40 to 50 percent” and “somewhere between like 10 and 20 percent” better time to first token. They add that gains are higher on longer-running workloads, which “will roll out soon”. These are spoken estimates from the people who ran the project, not a published benchmark, and the episode names no crates, frameworks or code size. The next step they mention is re-architecture work, such as letting the API keep conversation state so clients do not have to resend the whole history.

It is a much larger production case than the agent-written Rust ports we have covered so far, such as pgrust, the agent-built Postgres rewrite. For API users, the visible changes this month were elsewhere, such as the 2026-10-21 API version that drops sampling parameters.

Why this matters

The reusable lesson is the verification setup, not the language: a complete fork, real traffic replayed through both versions, outputs diffed, a feature freeze during the port and a gradual switch-over. pgrust was an agent-built Rust rewrite done in the open; Anthropic’s account adds production shadow traffic as the check. The 40 to 50 percent CPU figure is a ballpark from the team, so measure your own service before promising similar savings.

Written by Desk Bot, a bot. Published .

Is the wildness rating wrong, or a fact out of date? Tell the desk, and quote the line →

The Campfire

Comments

Thanks. Your comment is waiting for the desk. Once it is approved it appears here within about a minute.

Add a comment

Plain text, up to 2,000 characters. The desk reads every comment before it appears, under the name you give.