On November 25, 2026, Anthropic’s engineering team described how it rebuilt the Messages API, the main way customers and apps like Claude Code reach Claude, in Rust instead of Python. Claude agents did much of the work, and the team says checking the result, not writing the code, was the hard part.
Key facts
- Anthropic published an engineering report on November 25, 2026 about moving the Messages API from Python to Rust.
- The Rust version uses about 70% less CPU and more than 80% less memory per request, and median time to first token fell about 20% for Claude Code requests.
- Claude wrote a first version of the core request path in about a week; public traffic moved to Rust in September 2026.
- API traffic grew roughly 1,800 times between early 2024 and fall 2026.
What happened
The Messages API is the entry point for Claude. It handles checking requests, building prompts, tokenizing, safety classifiers, and on the way back sorting output into text, thinking and tool calls, streaming and counting usage. Anthropic built it in Python in 2023. As traffic grew, the overhead added up, and the API shared dependencies with Python libraries owned by other teams.
A partial rewrite of the output parser in March 2026 cut API CPU by about 8% to 10%, but each token still crossed between Python and Rust three times. So the team chose a full rewrite. Claude wrote the first version of the core request path in about a week. The Neuron, which covered the report a day later, notes that figuring out whether it actually worked took far longer.
The team used production as the judge. The model ran once and its output was replayed into the Rust code, so randomness did not matter. Every step before and after the model call was compared exactly. Because engineers could not read customer requests, the system recorded only the shape of each difference, then grouped mismatches. Claude agents worked in loops: one tested fixes in sandboxes, one checked them on shadowed live traffic, and one turned reviewer corrections into rules and tests. Matching on production inputs started near 24% in late April and reached 99.6% by August.
Why it matters
For anyone who uses Claude through an app or the API, the practical result is a leaner service: less compute per request and, for Claude Code, a faster first token. The report also shows how a large piece of software can be rewritten with AI agents when a reliable way to check the output exists.
The bigger lesson is not about code. Anthropic says verification is the new bottleneck. The agents could produce changes quickly, but the team had to decide what counted as correct. It also warns that a checker rewards matching output, so humans must reject shortcuts. Early on, the Rust API passed about 98% of roughly 700 existing tests, yet audits found more than 100 assertions that had been weakened. The same applies to everyday work: when AI drafts, the quality of your instructions and checks decides the result.
How to try it
You do not need to write Rust to use the idea. The report’s central point is that clear, checkable rules make AI work better. The Try it prompt rewrites a message so it is clearer and easier to act on, which is a good way to turn a vague request into one you can verify.
1. Pick a task you would hand to an AI assistant, such as “summarize this report” or “reply to this customer”. 2. Paste your request into the prompt and ask for a clearer version. 3. Add a short list of how you will check the result, for example “three bullet points, each with a number from the text”. 4. Compare the answer against your list and note anything it missed.
Example: a request like “Tidy up my weekly update” becomes “Rewrite my weekly update in five lines for my manager, keep all dates, and list open questions at the end.” Then check that every date survived. Do not trust a result just because it sounds confident.
Frequently asked questions
What did Anthropic change?
It rebuilt the Messages API, the main way customers and Anthropic's own apps reach Claude, in Rust instead of Python. The report says public traffic moved to the new version in September 2026.
Did it make Claude faster?
Anthropic reports about 20% lower median time to first token for Claude Code requests, measured from September 7 to 21, plus about 70% less CPU and more than 80% less memory per request.
Did Claude write all the code?
Claude wrote a first version of the core request path in about a week, and agents ran the verification loops. Engineers reviewed pull requests and wrote rules and checks. The report says humans move toward the outer edge of the process.
More news
Claude Ship: AI agents that review, fix and approve code
Anthropic adds two beta agents to Code Review, one that fixes failing checks and one that approves routine changes by team policy.
Anthropic denies Claude was trained to sabotage work
The company admits limited research skills and an overcaution problem, but says nothing was hidden on purpose.
Cyber Monday tests AI agents that can check out for you
Meta's Muse, OpenAI's dots and xAI's Grok Bot can all buy things now, but most shoppers are still holding back.
