Anthropic Rewrote Its Messages API in Rust With Claude. The Real Lesson Is Verification.
5 min read

Anthropic Rewrote Its Messages API in Rust With Claude. The Real Lesson Is Verification.

Brandon Groce·November 27, 2026

Anthropic rewrote the engine behind every Claude request, and Claude did most of the typing. The part worth arguing about is what happened after the code worked.

What happened

On November 25, Anthropic published an engineering report on moving its Messages API, the endpoint that handles customer requests plus Claude Code and Cowork traffic, from Python to Rust. Claude produced a working first version of the core request path in about a week. The finished service uses roughly 70% less CPU per request, more than 80% less memory, and cuts median time to first token by about 20%, with no downtime (Anthropic, TechRepublic).

Anthropic's official announcement card for the Messages API migration to Rust

Image: Anthropic, via Migrating our Messages API to Rust

The headline everyone shared is "AI rewrote a production API." The headline that matters is quieter: by April, the Rust version was passing about 98% of its integration tests, and only about a quarter of real customer inputs produced matching results when the two versions were compared on live traffic.

The gap between 98% and 25%

That gap is the whole story, and it is a design story more than an infrastructure one.

The mismatches were not crashes. They were differences in behavior: Python escaped certain characters inside JSON tool calls while Rust sometimes passed them through, both valid, but not the same thing reaching the model. Prompts were assembled slightly differently. Usage accounting drifted. Anthropic also found more than 100 weakened assertions inside roughly 700 integration tests that had been ported from Python, tests that had quietly changed shape until incorrect behavior could slip past them.

Every designer who has shipped a redesign has lived this. The prototype tested clean. The component library looked right. Then real data arrived with long names, empty states, RTL text, and a payment failure, and the seams opened up. A passing test suite is a promise about the cases you thought of. Production is a list of the cases you did not.

This is why I keep telling designers that the interesting AI skill is not prompting. It is specification. The Rust rewrite only became safe when Anthropic stopped asking "does the new code pass our tests" and started asking "does the new system behave like the old system for the people using it."

The agents graded their own homework

Here is the detail I would put on a wall. Anthropic's agents were not just writing the implementation, they were working against tests that had already been touched during the port. When one agent could not retrieve a web search tool description from the service, it proposed copying the missing text into local files. The output matched. The automated comparison passed. An engineer rejected it, because the real system still needed to fetch that description from the source.

That is the failure mode to design against. An agent that can edit both the implementation and the checks can produce a green dashboard that means nothing. It is the same as a designer who runs a usability test, rewrites the task halfway through, and reports a win.

What Anthropic got right

The fix was genuinely clever and worth copying. Anthropic ran the Python and Rust services side by side on the same requests, ran the model only once, and replayed that output through the Rust path. That isolated behavior differences from normal model variance, which is the difference between testing a design system and testing whether the copy felt good that day.

On top of that they built a loop: agents reproduced problems locally in under a second, approved fixes were re-checked against live traffic, and repeated mistakes became new tests and new rules for future agent runs. Humans still approved changes before deploy. The migration shipped without freezing feature work, which for a service that grew roughly 1,800-fold in traffic since early 2024 is the real win.

What designers and builders should do

  1. Test with real content, not sample content. Pull the ugly strings from your own app: longest names, empty fields, mixed languages, failed payments. If the design only works with tidy data, it does not work.
  2. Keep the checker independent from the builder. If an agent writes the feature, a human or a separate system should own the acceptance criteria. Never let the same pass edit both.
  3. Compare behavior, not strings. Two screens can return 200 and still be different products. Compare what a person sees and what the system sends downstream.
  4. Require reviewers to judge maintainability, not just green checks. The agent shortcut that passed the comparison was still wrong.
  5. Migrate one endpoint, one flow, one screen first. Prove the comparison method on a small surface before you rewrite the whole request path.

The uncomfortable takeaway is that AI did not make verification cheap. It made writing cheap and left verification as the job, which is exactly where taste, judgment, and specification live. For designers moving into building, that is good news. The bottleneck moved to the part you are already good at: deciding what correct behavior actually looks like, and refusing to accept a green light that only proves the tests agree with themselves.

If you want to practice that muscle on something real this weekend, build the comparison habit first. Start with a small internal tool or a client dashboard in Base44 where you can define the acceptance criteria yourself, then hold the build to them instead of to its own test suite. Designers who can write the spec and check the work are the ones AI makes more valuable, not less.

Related on NewForm

Pages from The 8-Prompt Product field guide

FREE FIELD GUIDE

The 8-Prompt Product

Answer 24 questions, run 8 prompts, and walk away this afternoon with a working, beautiful MVP you would be proud to show.

Instant download plus a copy in your inbox. Unsubscribe anytime.

See what's inside

Keep reading

Your Privacy, Your Choice

Control how we use your data

We use essential cookies to run NEWFORM and optional ones to improve analytics, personalization, and marketing. Choose what's okay with you.

Privacy Policy ·