New episode when Anthropic publishes

Anthropic
Blogcast

Every Anthropic announcement — model launches, research, policy — turned into a conversation. Follow the Anthropic blog without reading it. Hosted by Alex & Jordan.

10:21 · Nov 29, 2026
Anthropic Blogcast cover art

Latest episode

Episode 48 · Nov 29, 2026 · 10:21

Claude Solves Two Black Hole Problems

Claude Fable 5.2 solved two open problems in black hole physics: a Hawking-Page calculation left unfinished for over twenty years, and the exact modular bootstrap ceiling for quantum gravity.

All episodes

THE READING ROOM

The story, in your hands.

Read along at your own pace. Make the page yours.

EPISODE 4610 MIN READ

THE TRANSCRIPT

Migrating the Messages API to Rust

Anthropic moved its main Claude API from Python to Rust, using the production API itself as the verifier and cutting CPU per request by about seventy percent, with no downtime.

Open transcript
TEXT SIZE
100%
COLUMN
APPEARANCE
DISTRACTIONS

Alex: Welcome back to Anthropic Blogcast. Today we are talking about one of the most technical posts Anthropic has published in a while, and honestly one of the most revealing. It is called Migrating our Messages API to Rust, published on November twenty-fifth, twenty twenty-six.

Jordan: And this one is for the developers listening, because the Messages API is not some side project. It is the main way customers reach Claude, and it is also how Anthropic's own apps, like Claude Code and Cowork, reach Claude. If this API breaks, almost everything breaks.

Alex: Right. And the headline result is striking. After the migration, the API uses about seventy percent less central processing unit per request, and the median time to first token is cut by about twenty percent. And they did all of that without ever taking the service offline and without freezing feature development.

Jordan: Seventy percent less compute per request is a huge gain at their scale. The post says that from early twenty twenty-four to the fall of twenty twenty-six, traffic through this API grew roughly one thousand eight hundred times. A service built for a much smaller world was suddenly carrying an enormous load.

Alex: Let us set the scene. The Messages API was built in twenty twenty-three and written in Python, which made sense at the time because Python was widely used internally for research code. At first the API was simple. It passed requests to the model and sent back what the model wrote. One engineer at the time apparently called it basically a request forwarder.

Jordan: But simple did not last. By late twenty twenty-five, every request had to be validated, converted into a prompt, tokenized, and screened by safety classifiers. And as each reply arrived, the stream of tokens had to be sorted into text, thinking, and tool calls. Python added overhead at every one of those steps, every time it created an object, freed memory, or handed work to the next task.

Alex: So the team knew Rust would help. The interesting question is why they did not just do the obvious, cautious thing, which is to rewrite only the slow parts.

Jordan: They actually tried that first. They rewrote the code that parses the model's output in Rust and called it from Python. That reduced the API's compute usage by about eight to ten percent. But each token now crossed between Python and Rust three times, which created new overhead and complexity. The gains simply did not justify it.

Alex: Which leads to the big idea of the whole post, and it goes way beyond this one migration. Anthropic frames it as a generator and verifier gap. For many problems, it is far easier to verify that a solution is correct than to come up with the solution in the first place.

Jordan: Sudoku is their example. Checking a finished Sudoku is simple, you just count the numbers in each row, column, and box. Finding the solution can take a long time. Many ambitious projects with Claude have relied on exactly that gap. Formalizing proofs in mathematics, or migrating large, well tested codebases, are tasks Claude can take on as long as it has a reliable way to verify its work.

Alex: But a live production system flips that around. Generating the new code is now the easy part. Claude wrote a first version of the API's core request path in about a week. The hard part was verification. How do you prove that the new Rust version behaves exactly like the production Python version, for every real request customers actually send?

Jordan: And there were three reasons that was genuinely hard. First, the Python API kept changing throughout the migration, with new models and new features shipping regularly, so parity was a moving target. Second, Claude replies nondeterministically to the same request, so a difference between two outputs did not necessarily mean there was a bug. And third, for privacy reasons, the team could not read customer requests, so they could not easily see where the two versions diverged.

Alex: The existing tests were not enough either. They had about seven hundred integration tests, but the tests were coupled to the Python implementation, and when the team audited the ported tests, they found more than one hundred weakened assertions. A passing test might mean the code was right, or it might mean the test had been changed in a way that let wrong code through.

Alex: Here is the number that really lands that point. The Rust API passed about ninety-eight percent of its tests in April, yet only about a quarter of inputs matched on production traffic. Ninety-eight percent in the lab, roughly twenty-five percent in the real world. That gap is the whole story in miniature.

Jordan: So they turned the production API itself into the verifier. The technique is often called shadowing. You run real requests through both the old and the new code and compare what happens. But the usual shadowing tools assume a request can safely run twice, or that a service is deterministic, and neither assumption held here.

Alex: They had to be careful about billing and limits, so a request could only count once toward a customer's limits and bill. And to handle the nondeterminism, they ran the model once and replayed that same model output to the Rust version. Then they compared every stage before and after the model call, and those results had to match exactly.

Jordan: And because they could not look at the actual text of requests or replies, they recorded the shape of each difference instead. Where in the service it happened, and how big it was. They did that with two ideas the post names checkpointing and fingerprinting.

Alex: Checkpointing means both versions handle a request using the same steps, accept or reject it, resolve its settings, build the prompt, and every step produces a result you can compare, piece by piece. The first place the two versions differed told the team roughly where the migration code had gone wrong.

Jordan: And a fingerprint is what let them tell one bug apart from another. They recorded where each difference began in the prompt, plus the length difference between the two versions. Combined with the step and the piece of the prompt, one bug tends to leave the same fingerprint on every request it affects, so they could group errors by fingerprint and triage the fixes.

Jordan: Once you can detect differences, you need a system that fixes them at scale, and that is where the verification loops come in. A single bug could produce hundreds of thousands of nearly identical difference records, so a script ran every ten to thirty minutes, grouped them, and alerted a coordinating Claude agent only when it saw a new kind of record. That coordinator assigned a worker agent to own each new kind, and created a thread in a shared chat channel where human engineers could follow along.

Alex: There were three loops. The inner loop was fast and local. Agents worked in a cloud sandbox with both codebases and fast checks. One check took a request, built the prompt each version would send, and showed what differed, all in under a second, because it never actually called the model. Agents could guess a cause, write their own request to reproduce the difference, fix the Rust code, and add a test that failed on the old code and passed on the new one.

Jordan: The outer loop was slower and checked fixes against shadowed production traffic. And the seam between the two loops was the human checkpoint. Inside the sandbox, a wrong guess cost only a few seconds and had no impact on users, so agents could iterate freely. A fix could only cross into the outer loop after a human reviewed the pull request.

Alex: And the post is honest about why that human gate mattered. In mid May, one of the largest remaining differences came from web search. The production API fetched the web search tool's description from an internal service, and the Rust version did not call that service yet, so the description was missing from the prompts. An agent proposed a shortcut, copying the text into files the Rust code could read. The prompts matched, and the fix passed the local verifier.

Jordan: But an engineer turned it down, because it did not actually solve the problem. Rust would still need to call the service before launch, and at that point the workaround would be thrown away. The lesson is simple. A verifier can tell an agent whether the outputs matched, but it cannot tell the agent whether the fix is good enough to ship. That judgment still belonged to a human.

Alex: Then there is the third loop, the memory loop, which might be the most transferable idea in the whole post. When that engineer rejected the shortcut, the agent saved a note explaining the decision, the reason, and the correct fix, which was to have Rust call the service that supplies the tool descriptions. Building that call took the team weeks, and in the meantime the same bug kept producing records with new fingerprints. Agents checked the memory note, recognized the known bug, and linked the records to it instead of inventing another workaround.

Alex: There is also a striking context number tucked into this story. By May twenty twenty-six, Claude was writing more than eighty percent of the code Anthropic merged. So this migration was not a side experiment with a coding assistant. It was the main way the company now builds software, applied to one of its most critical systems.

Jordan: Which brings us to the lessons Anthropic draws at the end. First, verification is the new bottleneck. Writing code used to be the expensive, risky part of a big migration. Now the constraint is how quickly you can verify results, and your ambition can grow as long as there is a way to check correctness.

Alex: Second, you have to carefully design the verification signal. A proof assistant points to the failing step, and a test names the failing case, but a production system offers no such signal by default. Most of the effort in this project went into building that signal, the checkpoints that located each difference in the code and the fingerprints that told one bug from another.

Jordan: And third, keep the loops simple and let humans move outward. At first, engineers worked inside the inner loop, chasing differences themselves. Later they moved to the seam, steering agents and reviewing fixes. As the system matured, they moved to the edge, writing the rules and checks the agents worked within. The post describes that arc as evolving from directing Claude to Claude directing itself, with humans kept mainly for the important judgment calls.

Jordan: Seventy percent less compute per request, twenty percent faster to the first token, no downtime, and no feature freeze. That is the result. But the real takeaway for anyone building with these tools is the method. If you want agents to do bigger work, do not start by asking how fast they can generate. Start by asking how you will know, quickly and precisely, when they are wrong.

Alex: And design that check before you need it, keep a human at the seam where judgment matters, and write down what the humans teach the agents, so nobody has to teach the same lesson twice. That is it for today. Thanks for listening, and we will be back with the next post.

Never miss a launch

Episodes drop whenever Anthropic publishes — follow on Spotify, watch on YouTube, or grab the feed in your favorite app.

The RSS feed works in Apple Podcasts, Overcast, Pocket Casts, and any podcast app.

Join The Joy Digi list

News from Anthropic Blogcast and the rest of the studio, plus first word on new shows and books. Unsubscribe anytime.

A production of The Joy Digi

An independent show. Not affiliated with, endorsed by, or sponsored by Anthropic.