On the Claude Code team, the vast majority of the code — around 90% — is written and reviewed by Claude itself. At that scale, the question is no longer whether an agent can write code. It's whether an agent can prove its code works.
That's the subject of a new post from Anthropic's Claude.dev blog, "How the Claude Code team thinks about verification," written by Addy Osmani and published on November 16. The core argument is simple: verification loops are what let you delegate more work to agents. Without them, you can really only run one or two Claudes at a time, because you have to check everything yourself. With them, you can run dozens or hundreds in parallel.
Why verification beats better prompting
In internal testing around structured file generation, having a separate grader check Claude's work against a rubric improved task success by up to 10 points over a standard prompting loop — with the largest gains on the hardest problems.
The reason is economic. Things that used to be expensive to verify — tests, benchmarks, specs, real end-to-end runs — are now cheap to ask an agent to produce. And once generated, those tests run as software, so they can be executed frequently without burning many additional tokens.
The loop closes when results feed back into the agent's behavior. If an agent repeatedly fails a test that checks logs for user data, the team adds a hook or a more explicit rule in CLAUDE.md to stop it happening again. Verification isn't just a gate; it's how the agent gets better at the task.
The three tests worth investing in
Not all tests are equal, and the post is blunt about the failure modes: flaky tests train the agent to re-run tests instead of fixing code, and slow tests mean fewer tests per batch, which makes bugs harder to pinpoint. Heavier tests belong before the change is committed. Within that frame, three types earn their keep.
End-to-end tests. If you focus on one type, pick this one. E2E tests describe real user flows — add an item to a cart, check out, reach the confirmation page. They are hard to fool: either the whole feature works or it doesn't. And unlike a unit test that just says "timeout after 30 seconds," an E2E failure gives you a step trace, a screenshot, and a description of what broke. Unit tests are faster and less flaky, but you can pass them all and still ship a broken feature, because neither the agent nor the test understood the full task.
Property tests. Most tests are written around what you thought might go wrong. Property tests hunt the edge cases people tend to miss — exactly where agents often fail. You write a statement you think can't fail (round-trip encoding, an invariant like "account balance can never become negative," idempotency, equivalence with a naive implementation), then let a library — fast-check for JS/TS, Hypothesis for Python, proptest for Rust — generate thousands of inputs trying to prove it wrong. The edge cases come from the library, not from the agent that wrote the original code, so they don't share its blind spots. They're especially useful in rewrites, where the spec has drifted from production behavior and is no longer a reliable source of truth.
Differential tests. When functionality is expected to stay the same — a large-scale migration, for example — run the old system and the new system on the same inputs and compare. Any difference is a bug or a breaking change. The trick is using randomly generated inputs or a sample of production traffic, normalizing irrelevant differences like whitespace, and keeping a list of approved changes for places where the new environment is supposed to differ.
How the team applies verification in practice
The post then gets specific about how the Claude Code team runs its own workflow:
Verification means running the change. Running the app end to end matters more than tests. Claude tests the whole app the way a human or QA engineer would — the Claude Chrome extension for web changes, an iOS or Android MCP for mobile, computer use for desktop, or a locally running service for backend work. The team codifies how to boot the simulator or run the app in a skill called verify, stored in the repo's .claude/skills/ folder, close to the relevant code. Claude knows to use it before committing. Then they invest in making that skill fast and reliable, iterating and stress-testing it, because it's the smoke test harness for everything.
Failing tests escalate to a human. Nobody can read every change, so failures are the signal for what needs a person. Claude runs the checks and tries to fix anything that fails. If a check is still failing after three rounds, Claude stops and brings in a human.
Code owners write their own checks. The people who own the code write and refine the checks for it, until they flag what the owner would flag. When a check pulls in a reviewer, it should say why, so the reviewer doesn't have to work it out from the diff.
Reliability checks trigger on the diff. The team maintains a 39-item reliability checklist, each item with a trigger readable from a diff, a check, and the incident or PR behind it. One example: "--resume loads old transcripts" — when session storage or message types change, the team asks whether a new field loads safely, since older transcripts won't have it. Claude reads the diff and checks only the items whose trigger matches, usually 3 to 10, so nobody has to memorize past outages.
One reviewer, multiple rounds. The team doesn't improve reviews by stacking on more reviewers; tuning the primary reviewer beats adding a second, more expensive one. Instead they keep a REVIEW.md file describing what the reviewer should pay attention to for that code. Review rounds build on each other, each pass pointing at context from earlier rounds and past failures rather than re-checking everything from scratch. It's cheaper, and it finds more.
Changes can't modify their own checks. If a change can modify the check that judges it, the check is broken. Code Review reads REVIEW.md from the base or default branch — never from the pull request's changes. The rules that gate changes live on a branch the change can't touch. Reviews are also reserved for commits: a passing review on an out-of-date commit means nothing. And cheap checks run first — Claude runs tests, build, and linter before opening a pull request, so it doesn't spend shared review and CI time on a bug it could have caught itself.
New gates start in observe mode. Every commit is stamped with how it was verified — the stamp even includes "none," so unverified commits can be queried. A commit gate can block a commit if the session didn't include /code-review or /verify, with off, observe, and enforce modes. Observe mode logs what would have been blocked, so false positives can be reviewed before anyone is affected. Enforce mode blocks the commit, though any commit can explain in its message why it wasn't verified, and if commits have been blocked twice in a session, the next one is allowed through so Claude doesn't get stuck.
Test your checks on what actually matters. The team regularly reviews the reviewers, tracking how many merged changes were reverted, how many changes a maintainer rejected before merging, and a size-matched subset of changes that stayed clean. The Code Review team built a formal evaluation from past incidents and reverts: each example recreates the repo at the time of review with a one-sentence answer key for the bug, and only findings that correctly describe that bug score. Merged, stable changes serve as a control against over-flagging, and the tuning set is kept separate from the fixed test set. Recall is measured separately for raw findings, post-verification, and final review, so the team can see whether the system is losing bugs it already found. Importance is graded too — findings are tagged Important, Nit, or Pre-existing, so a reviewer doesn't hold an author responsible for a bug that was already there. Finally, recall is tuned up only to the point where the next improvement would be overfitting to the eval rather than actually catching bugs.
Turn misses into rules. The repo has two ways of converting a missed case into a rule. First, patterns are extracted from human code review comments and PR reverts: a candidate must occur in at least two PRs and be identifiable from a diff, then three agents try to disprove it, and a human reviews and approves it in a PR. Second, three bug finders replay a PR associated with a known incident — if at least two find the bug, it's a detectable bug, and missing it on a small diff is a gap worth writing into REVIEW.md. Flaky tests get the same treatment: Claude can't skip them, add sleeps, or retry until they pass. If it can't find the root cause, it deletes the test and writes down why. And rules need pruning — test suites, verification steps, and .md files only grow, so the team tidies them on a routine.
The shift that matters
The post's closing line reframes the whole job: once verification works, your work shifts from reading every diff to defining what "done" looks like and reviewing the evidence. That's what lets you run many Claudes at once.
For teams adopting coding agents, the takeaway isn't "write more tests." It's that the verification layer is a system of its own — one that needs to be fast, honest, and out of reach of the changes it judges. Keep it close to the code it protects, grade it against the bugs that actually hurt, and write down the lesson every time it misses something, so it never misses the same thing twice.
Source: Anthropic, "How the Claude Code team thinks about verification" (claude.dev, November 16, 2026).
Top comments (0)