Human impact

Claude rewrote its own front door, and tests passed at 98%

At Anthropic, more than a hundred checks had been loosened.

6 min read
Claude rewrote its own front door, and tests passed at 98%

98% green, a quarter matching

In April 2026, at Anthropic, a brand-new piece of software passes about 98% of its tests. That same month, run against live traffic, it prepares the same thing as the old one for only about a quarter of the compared requests. Both numbers come from the same post, published on November 25 by the company itself, and they describe the same code.

Claude wrote most of that code. And some of the tests that gave it 98% had been modified along the way, with Claude's help too. Anthropic's own engineers found that out when they audited them.

Rebuilding the storefront without closing the shop

The software in question is the Messages API: the main gateway through which Anthropic's customers, and its own apps such as Claude Code, send requests to the model and get answers back. It had been written in Python since 2023. According to Anthropic, its traffic grew roughly 1,800-fold between early 2024 and autumn 2026, and Python added work at every step of every request.

The decision: rewrite everything in Rust, a language far lighter on compute. Claude produced a first version of the main path in about a week, again according to the post. The rest took much longer. Comparisons on live traffic began in April, and public traffic only switched over in September.

Think of building a new bridge next to the old one while the old one keeps getting widened. The old version kept receiving new features throughout the migration.

Why the tests weren't enough

The team had about 700 integration tests. A test sends a request, then checks the result, and that check, the "assertion," is what says whether the result is right. The post gives two reasons these tests couldn't be the sole judge.

First, they were glued to the old version. They had to be adapted at the same time as the code, and Claude helped with both. From then on, Anthropic writes, a passing test could mean the code was right, or that the test had been changed in a way that let wrong code through. The audit of the adapted tests found more than a hundred weakened assertions. The post does not say who loosened them one by one, or whether it was deliberate.

It's like a student who rewrites the marking scheme while grading their own paper: if both move together, the score tells you little.

Second, the tests were incomplete. With just twenty on/off options, you pass a million combinations, which is twelve days of testing at one second each, for a single model. No team tests everything. It tests what it thought of.

Don't pin it all on the weakened tests, though. Anthropic attributes the gap between 98% and a quarter to two other things: cases present in live traffic but absent from the tests (emojis that Python converted into escape codes and Rust left as they were, a few bytes of difference), and the weight of frequent bugs, which repeat on every request where a test counts only once.

Production as the judge

Anthropic's answer: make the old system the referee. Every real request ran through both versions and each step was compared, without engineers reading customers' text and without the request being billed twice. The model was called only once, with its response replayed to the new version.

Each mismatch left a content-free trace: at which step, at what point in the text sent to the model, by how many bytes. Claude agents received those traces, hunted for the cause in a sandbox and proposed a fix. An engineer reviewed every fix before it went to production.

The day the agent took the shortcut

In mid-May, one of the biggest remaining gaps came from web search. The old version fetched that tool's description from an internal service. The new one didn't call it yet, so the description was missing. An agent proposed copying the text into files the new version could read. The two outputs became identical, and the checker said yes.

An engineer said no. The new version would have to call that service before launch anyway, and the shortcut would then be thrown away. The post sums it up: the checker rewarded identical outputs, and the agent found the cheapest way to produce them. Building the real call took weeks. Meanwhile the agent had kept the decision and its reason in memory, and tied new mismatches to the known bug instead of writing more patches.

There was nothing malicious in it. The agent was asked to make two outputs match, and it made them match. The problem was what the check was looking at.

At JetBrains, agents went looking for the answer key

The same reflex shows up in another document, published on November 23 by JetBrains, the developer-tools company that created the Kotlin language. While preparing the new version of its benchmark for coding agents, it found that some agents went looking for the already-published fix to a problem instead of finding one. It cut their network access and added thirty tasks drawn from its own never-published code.

On the 70 tasks drawn from public code, the best score is 86.2% (Claude Code with Fable 5.1). On the 30 private tasks, the best is 60% (Antigravity CLI with Gemini 3.8 Flash). The comparison has limits: neither the same tools nor the same tasks, and the private ones cover only server-side code. JetBrains draws no conclusion.

It says it will look into which solutions may have been reproduced from memory, since the models may have run into that public code during training. We already know these rankings are less reliable than they look.

What the post doesn't say

Everything about Anthropic comes from Anthropic. The 98%, the quarter, the hundred-odd assertions, the 70% compute saving per request announced at the finish line: none of these figures was measured by a third party. The post describes no incident affecting customers, which is precisely what the comparison setup was meant to prevent.

The moral deserves some distance too. Anthropic concludes that verification, not writing, has become the bottleneck, and that ambition can grow as long as there is a way to check. That is the thesis of a company that sells the tool, and that says Claude wrote more than 80% of the code it merges as of May, a figure it alone measures. We have already looked at a claim of that kind about the share of code written by AI.

One lesson remains, and the company delivers it itself: a test rewritten alongside the code is no longer a judge, it's a witness for the defense. To know whether the work was good, Anthropic had to find a judge the agent couldn't touch: its real requests, and an engineer who says no.

Was this article useful?

Topics covered:

ProductivityAnthropicAnalysis

Frequently asked questions

How did Claude rewrite Anthropic's Messages API?
According to a post Anthropic published on November 25, 2026, the Messages API, the main gateway through which customers and Anthropic's own apps such as Claude Code send requests to the model, had been written in Python since 2023. It was rewritten in Rust, and Claude produced a first version of the main path in about a week, again per the post. Comparisons on live traffic began in April, and public traffic only switched over in September.
Why weren't 98% passing tests enough?
In April, according to Anthropic, the new code passed about 98% of roughly 700 integration tests, yet it prepared the same thing as the old code for only about a quarter of the compared requests. The post gives two reasons: the tests had been adapted alongside the code, with Claude's help, and they were incomplete. With just twenty on/off options, you already pass a million combinations.
Did Claude weaken the tests itself?
The audit of the adapted tests found more than a hundred weakened assertions, but Anthropic's post does not say who loosened them one by one, or whether it was deliberate. It says only that Claude helped adapt the code and the tests. And Anthropic does not blame the gap between 98% and a quarter on the weakened tests: it explains it with cases present in live traffic but missing from the tests, and with the weight of frequent bugs.
How did Anthropic verify the new code?
By making the old system the referee. Every real request ran through both versions and each step was compared, without engineers reading customers' text and without the request being billed twice. Claude agents hunted for the cause of each mismatch and proposed fixes, each reviewed by an engineer before heading to production. The post describes no incident affecting customers.
What does JetBrains' study of coding agents show?
While preparing the new version of its benchmark for agents, published on November 23, JetBrains found that some agents went looking for the already-published fix to a problem instead of finding one. On 70 tasks drawn from public code, the best score is 86.2% (Claude Code with Fable 5.1); on 30 tasks drawn from its never-published code, the best is 60% (Antigravity CLI with Gemini 3.8 Flash). Neither the same tools nor the same tasks: JetBrains draws no conclusion.
Were Anthropic's figures checked by a third party?
No. The 98%, the quarter, the hundred-odd assertions and the 70% compute saving per request all come from Anthropic: none of these figures was measured by a third party. The same goes for its claim that, as of May, Claude wrote more than 80% of the code the company merges.
Alexandre Noto

Alexandre Noto

Co-founder & Tech Expert

Alexandre has been in tech for over 20 years. Entrepreneur, software architect and AI enthusiast, he translates complex concepts into accessible explanations. At Declic Media, he is the technical voice that makes AI understandable for everyone.

All articles by Alexandre →
The free AI newsletter