Skip to content
AI EmployeeSuper-AgentsAgent-to-AgentBenchmarksPricingBlog

Anthropic Rewrote Claude's Messages API in Rust

At a glanceQuick answers
What did Anthropic do?
It replaced the Python monolith behind Claude’s Messages API with a Rust version written by Claude, verified with shadow traffic and now fully rolled out, per its engineers on Latent Space.
What did it save?
A ballpark 40 to 50 percent of CPU, and 10 to 20 percent faster time to first token, by the engineers’ own estimate.
Does anything change for developers?
Not in the API itself: the port aimed for identical outputs. The visible change is speed, with re-architecture work to come.
Editorial data illustration on a near-white ground: a stream of navy request arrows splits into a grey server labelled Python and a teal server labelled Rust, both feeding a check badge labelled Same output, with a large amber 40-50% less CPU under the Rust server
Fig 0One stream, two engines, the same output, and far less CPU. Made by CellCog's image agent, running GPT Image 2.5.

Anthropic has replaced the Python code behind Claude’s Messages API with a Rust version that Claude itself wrote. Two Anthropic engineers described the project on the Latent Space episode How Anthropic ships the #1 LLM in the World, published October 27, 2026: “as of last week we fully rolled out the messages API written in Rust.” Their ballpark for the result is 40 to 50 percent less CPU and a 10 to 20 percent faster time to first token.

The clip spread on X on October 30, three days after the episode, through a post by @somi_ai. The guests were Katelyn Lesse and Angela Jiang; the published transcript carries no speaker labels, so the quotes below are attributed to the Anthropic engineers on the episode rather than to one named guest.

On this page · 6 sectionsOpen
  1. What Anthropic changed
  2. How they did it: Claude wrote it, humans planned and checked
  3. The numbers, and how firm they are
  4. Anthropic’s port next to GitHub’s
  5. What is confirmed, and what is not
  6. Where CellCog stands
Key points5 · 7 min full read
  1. A grey server swapping to a teal server.
    Anthropic has fully rolled out a Rust version of Claude’s Messages API, replacing a Python monolith, its engineers said on Latent Space on October 27, 2026.
  2. A hand drawing a plan beside a robot arm typing.
    Claude wrote the Rust code; the humans designed the system and verified it. The team started with no Rust developers.
  3. One arrow splitting into two lanes that meet at a check mark.
    They built a full Rust fork and ran shadow traffic through it, checking its outputs against the Python system before moving real traffic.
  4. A tall bar beside a much shorter bar and a stopwatch.
    Their ballpark: 40 to 50 percent less CPU and 10 to 20 percent faster time to first token. It is a podcast answer, not a published benchmark.
  5. Two steps with a small box on the first and a larger outline on the second.
    Next is re-architecture, including keeping conversation state on Anthropic’s side so callers do not resend the whole conversation.

§ 01What Anthropic changed

Animated diagram: requests split to a grey Python monolith and a teal Rust fork, outputs are compared and match, then the Python box fades and the Rust fork serves all traffic, with a tag reading CPU saved 40-50%, ballpark
Fig 1Copies of real requests ran through both engines until the outputs matched.

The Messages API is the endpoint every Claude app, agent and developer integration calls. When one of the guests joined Anthropic “a little over a year ago”, it was a Python monolith running in a single Google Cloud region. It has since gone multi-region, but the CPU problem stayed: “we’re going to hit a CPU wall.”

The engineers describe CPU as a fixed budget negotiated with cloud providers and split across product services, the sandboxes agents run in, CI and research. Agentic coding makes the squeeze worse, because “you’d be surprised how much more code is getting written”, and more code means more CI runs. Their answer was to make each request cheaper: “So we chose Rust, which was a crazy decision at the time.”

Item What they said
Before A Python monolith, very CPU inefficient
Team at the start No Rust developers; a couple of Rust hires came later
Who wrote the code Claude; the humans designed the system
How it was checked A full Rust fork, with shadow traffic compared against Python
Scope A pure port, no new features
CPU 40 to 50 percent saved, a ballpark
Latency 10 to 20 percent faster time to first token
Status Fully rolled out, per the October 27 episode
Table 1The rewrite, in the engineers’ own account (Latent Space, October 27, 2026)
Reported improvement after the Rust port, low and high ends, in percentBar chart of the ballpark ranges the engineers gave: CPU saved 40 to 50 percent, highlighted at the high end, and time to first token 10 to 20 percent fasterCPU saved, low end40CPU saved, high end50First token faster, low end10First token faster, high end20Reported improvement after the Rust port, low and high ends, in percentBar chart of the ballpark ranges the engineers gave: CPU saved 40 to 50 percent, highlighted at the high end, and time to first token 10 to 20 percent fasterCPU saved, low end40CPU saved, high end50First token faster, low end10First token faster, high end20
Fig 2Reported improvement after the Rust port, low and high ends, in percent

§ 02How they did it: Claude wrote it, humans planned and checked

The team started with no Rust experience: “we don’t have a single Rust developer in the room.” The split of work was explicit. “Claude is going to write the code. The humans like design the system”, because at the end it is a distributed system that people have to own. Claude also helped the engineers learn what they needed to design it.

Animated diagram of four steps, plan the design, write the Rust code, verify with shadow traffic, roll out, with human figures over steps 1 and 3, a Claude robot arm over step 2, and a tag reading No Rust developers in the room
Fig 3Humans planned and verified; Claude wrote the Rust code.

The engineers say “the two things that mattered most were the plan to do the thing and then the verification of the thing.” The verification was the bold part: “we literally built like an entire fork of the entire API in Rust and then started running shadow traffic through it”, checking that the Python system and the Rust system returned the same outputs before real traffic moved over.

That is the opposite of how big rewrites usually go. A team would carve out one piece at a time over a multi-year migration. “It would have taken years and years and years.” Here the whole API was ported in one piece and then turned on slowly.

A small team did the port while the rest of the API group kept building features, and static analysis flagged any new feature that did not account for the Rust side. The porting team called it a port, not a redesign: they held back from adding features or changing how the system works.

§ 03The numbers, and how firm they are

The figures come from a podcast answer, not a published benchmark. Asked for an order of magnitude, the engineer called it a ballpark: “we’ve saved somewhere like 40 to 50%” of CPU, and “somewhere between like 10 and 20%” faster time to first token, with gains also on longer-running workloads. The speaker added that it will get faster.

For developers, the point of shadow traffic is that nothing should look different except speed: same API, same outputs, quicker first tokens. The next step is where changes may become visible. The team’s next goal is re-architecture, including not having callers “pass back and forth the entire like conversation state” on every request, with the state stored by Anthropic for some period instead. Long conversations would gain the most.

§ 04Anthropic’s port next to GitHub’s

This is the second large production codebase moved to Rust by agents this autumn. In September GitHub published how it moved the Copilot agent runtime to Rust, with receipts down to the token bill; our record of that port has the full numbers. The two projects checked their work in different ways.

Anthropic Messages API GitHub Copilot runtime
Ported from A Python monolith TypeScript on Node.js
Written by Claude, humans designing and verifying Agents, led primarily by one developer
How it was checked Shadow traffic, Python vs Rust outputs End-to-end TypeScript tests kept as the oracle
Approach A full fork, then a slow rollout In place, component by component, 128 pull requests
Reported result 40 to 50 percent less CPU, ballpark 5.25 s to 292 ms per client lifecycle
Source Podcast, October 27, 2026 GitHub engineering blog, September 17, 2026
Table 2Two agent-written Rust ports, side by side

Both teams landed on the same lesson: the agent writes the code, and the people own the plan and the check. Both also translated first and saved redesign for later.

§ 05What is confirmed, and what is not

  • Confirmed on the record: the Rust Messages API is fully rolled out, Claude wrote the code, and the team verified it with shadow traffic against the Python system.
  • A ballpark, not a benchmark: 40 to 50 percent less CPU and 10 to 20 percent faster time to first token.
  • Not stated: which engineer said which line, when the port started, how long it took, or what it cost.
  • Coming, per the episode: re-architecture work, including keeping conversation state on Anthropic’s side.

§ 06Where CellCog stands

Our conflict, declared: CellCog runs its agents on Claude Opus 5.5 through Anthropic’s API, so the Messages API sits in our own path. We have not measured the change on our traffic, and nothing above is our benchmark.

Frequently asked5 questions

Q1Who wrote the Rust code for Claude's Messages API?

Claude did. Anthropic’s engineers said the humans designed the system and verified it, and the team had no Rust developers when it started.

Q2How did Anthropic check the Rust version?

It built a full fork of the API in Rust and ran shadow traffic through it, comparing its outputs with the Python system before moving traffic over.

Q3How much did the Rust rewrite save?

The engineers gave a ballpark of 40 to 50 percent less CPU and 10 to 20 percent faster time to first token. Anthropic has not published a benchmark.

Q4Where did Anthropic announce the Rust rewrite?

On the Latent Space podcast episode How Anthropic ships the #1 LLM in the World, published October 27, 2026, with guests Katelyn Lesse and Angela Jiang.

Q5Does the Messages API work differently now?

The port was meant to return the same outputs, so the API is unchanged. Anthropic says re-architecture work, such as storing conversation state, comes next.

Published 31 October 2026 All Multi-agent & AI organizations →