Claude Wrote 90% of the Code—How Does Anthropic Confirm It Didn't Break It
The Claude Code team writes about 90% of its code with Claude, and Claude reviews it too. Addy Osmani breaks down this verification loop: three kinds of tests worth investing in, a 39-item reliability checklist triggered by diff, and the rule most easily skipped: changes must not modify the checks that judge them.
The Claude Code team at Anthropic has a number: about 90% of their code is written by Claude and also reviewed by Claude. After this number spread on X, the two most common questions in the comments were: is it real, and who guarantees that it runs.
Addy Osmani wrote a long article answering the second question. The original is here. It is very information-dense and worth reading in full. Below are the parts I found most useful.
The verification loop determines how many agents you can run at once
Without a verification loop, you can only run one or two Claudes at a time, because you have to look at every output yourself. With a loop, you can run dozens or hundreds in parallel.
They ran internal tests, and on tasks such as structured file generation, having an independent grader check Claude's output against a rubric raised the success rate by up to 10 percentage points compared with a standard prompting loop; the harder the problem, the bigger the gain.
Another change is cost. Tests, benchmarks, specs, and a real end-to-end run used to be expensive, but now the agent can generate them itself. Once generated, these tests run as software, and rerunning them does not require extra tokens.
Three kinds of tests worth investing in
First, failure modes. If tests are flaky, the agent learns to rerun them instead of fixing the code. If tests are slow, the agent will run fewer batches, making issues harder to localize.
E2E. If you can only pick one, pick this. The reason is that it is hard to fool: the whole feature either works or it doesn't, and the completion criterion is clear. It is common for all unit tests to be green while the feature is broken, because neither the agent nor the tests understand the full task. E2E gives the agent hands and eyes, using CDP, emulators, and API harnesses to run the real system.

On the left in the image is a unit test failure: Error: Timeout after 30 seconds. On the right is an E2E failure: sign up, add to cart, checkout, then get stuck because the payment form didn't load and the place-order button stays gray. Which is easier to fix is obvious.
Property tests. Many people are hearing about this for the first time, including the person who retweeted this post. The approach is to first write a proposition you think cannot fail, then use a library to generate thousands of inputs to try to disprove it. JS/TS uses fast-check, Python uses Hypothesis, and Rust uses proptest.
Common kinds of propositions: encode then decode returns the original value; account balance never goes negative; running a migration twice has the same effect as running it once; optimized code produces the same results as naive but correct code.
Its value lies in the fact that the bias in generated inputs is different from that of the agent that wrote the original code. It is especially useful when rewriting legacy systems, because the spec has long since diverged from production behavior and cannot be used as a basis for verification.
Differential tests. Feed the old and new systems the same inputs; inconsistent results mean a bug or breaking change. Best suited for large-scale migration scenarios. The key is to generate inputs randomly or sample production traffic, normalize away irrelevant differences such as whitespace, and maintain a list of “approved differences”.
How the team does it themselves
This part is more interesting than the test types.
Verification means actually running the change. It is not enough for tests to pass; you have to run the app like a QA would. They built a skill called verify, placed in .claude/skills/, as close to the relevant code as possible, and Claude calls it before committing. The skill itself also has to be iterated until it is fast and reliable; it is the foundation for smoke testing.
Humans are needed only when tests fail. Claude fixes them itself; if it is still red after three consecutive rounds, it stops and calls someone.
Whoever owns the code writes the checks, and keeps tuning them until they surface the issues the owner would have raised themselves. When a check pulls someone in, it should clearly state why, so the reviewer doesn't have to guess from the diff.
A 39-item reliability checklist, each with a trigger condition that can be read from the diff. Claude reads the diff and runs only the triggered items, usually 3 to 10. No one needs to memorize historical incidents. For example, the item “--resume must be able to load old transcripts” triggers whenever session storage or message types change, because old transcripts won't have the new fields.
One reviewer, multiple rounds. They don't improve quality by stacking reviewers; adding a second, more expensive one is usually worse than tuning the first. Use REVIEW.md to make clear what this code should be checked for. Later rounds continue with the context from earlier rounds and past failures, rather than re-reviewing from scratch.
Changes must not modify the checks that judge them. Code Review reads REVIEW.md from the base branch or default branch and never from the changes in the PR. I think this is the rule most easily skipped: let the code-writing agent casually change the tests, and whenever a test goes red it changes the expected value, until the tests are just restating the code.
New gates run in observe mode first. Every commit is stamped with its verification method, including none, so you can check which commits were never verified at all. The commit gate has three levels: off, observe, and enforce. Observe only records cases that would have been blocked, so you can first see whether there are false positives. After being blocked twice in a row, the next commit is let through, so Claude doesn't get stuck.
Periodically evaluate the reviewer itself. Look at the proportion of changes reverted after merge and the proportion sent back by maintainers, then compare against a size-matched set of changes that have remained clean to date. The eval reconstructs the repository state at the time using historical incidents and reverts; only findings that accurately describe the bug score points. Recall is calculated separately for three stages—raw finding, post-validation, and final review—otherwise you can't tell at which step the bug was lost.
Turn what was missed into rules. A pattern from human review comments and PR reverts only becomes a candidate rule if it has appeared in at least two PRs and can be identified from the diff. Three agents try to refute it, and a human makes the final approval. Flaky tests must not be skipped, given sleeps, or retried until they pass; if you can't find the root cause, delete the test and write down why.
What's worth copying
Test suites, verification steps, and .md rule files will keep growing if left unchecked. They clean them up regularly, deleting items that no longer have value.
The most expensive part of this whole setup is not writing tests; it's maintaining those rules and checklists. Once it's in place, your job shifts from reading every diff to defining what “done” means and then reviewing the evidence.
There was also a quite practical question in the comments: is that 10% hand-written code at Anthropic real? That percentage doesn't sound low. But the 90% figure itself isn't the point; the point is the system that makes 90% trustworthy.
发布时间: 2026-11-18 02:34