AI & Emerging Interfaces

Anthropic's Verification Loops Let Claude Fix Its Own Code Before Merge

Anthropic let Claude run for two weeks in staging, load testing and fixing infrastructure. Its verification loops pass agent code through review and verifier agents up to three times before merge.

  • AuthorJames Calloway
  • ChannelAI & Emerging Interfaces
  • Filed
  • Read3 min
Anthropic Engineer Explains How to Verify Claude Code Builds
Anthropic Engineer Explains How to Verify Claude Code BuildsAI-generated
  • Claude ran continuously for two weeks in an Anthropic staging environment, load testing infrastructure and fixing broken parts
  • Builder-to-reviewer-to-verifier loops run up to three passes; Boris Cherny says self-verification improves final quality two to three times
  • Separate sandboxes let agents verify 15 user flows in parallel without database conflicts
  • A 39-item reliability checklist from past incidents triggers targeted verification from a change's diff
  • Amjad's bug bash on his own app found 4 high, 23 medium and 41 low defects despite a passing flow

For two weeks, Claude ran nonstop in an Anthropic staging environment, load testing every part of the infrastructure and fixing what it found broken. That experiment, reported by Anthropic engineer Ray Amjad, is the most visible proof of a workflow the company now treats as essential: verification loops that check software written by Claude Code before a change is merged.

Claude Code is Anthropic's coding agent. It reads a codebase, edits files and runs commands. But when an agent writes and reviews most of a project's code, someone still has to confirm its changes work — and whether later changes break them. Anthropic puts it plainly: without a verifier, a developer can run only one or two Claudes at a time before personally checking each change becomes the bottleneck.

How does the loop work?

A builder passes its work to a review agent and a verifier, fixes what they find, and repeats. One setup loops through up to three passes. Boris Cherny, who created Claude Code, has said that giving Claude a way to verify its own work improves the quality of the final result by two to three times.

Anthropic's advice: if you write only one kind of test, make it end-to-end. Without a check at the surface a user touches — a web page, an API, a CLI, a mobile app — an agent may pick an easier unit test and report the change as verified without exercising the flow. A verification skill splits the work into three stages:

  • Setup — launch the app and put the database in the state the flow needs
  • Driving — interact through the same surface a user would
  • Checking — confirm the driver followed the intended steps, clicking real buttons rather than bypassing them with JavaScript

Even passing flows can hide defects. In a bug bash on an app of his own, Amjad found no critical issues but four high, 23 medium and 41 low — including accessibility, contrast and one-time-password pasting problems. In another check, an agent completed the flow it was asked to verify but flagged six things that looked or felt off, including a cancel button that didn't clear a dialog.

Why sandboxes and a private cloud?

A sandbox template ships the app and its dependencies — Postgres, Redis, Playwright — so agents don't rebuild the environment each time. Separate sandboxes let agents verify 15 user flows in parallel without fighting over database state; running them in one sandbox would need roughly 15 Postgres instances. Agents may also get Cloudflare and AWS accounts with budget caps to create buckets, deploy Lambda functions, rent GPUs and stress test services they host themselves. Access matters too: without its own Slack account, an agent can't exercise a Slack integration the way a user would.

Who checks the checker?

A faulty verification skill can let real bugs through or block clean code. Anthropic recommends treating the verification layer like any other system. Amjad planted bugs in 15 pull requests to test the skill; the report showed some calls right, others only partly right. Another step: repeat previous pull requests weekly and report improvements.

The company also compiled a 39-item reliability checklist from past incidents. Claude reads a change's diff and runs an extra verification step only when the change matches an item's trigger — for example, checking session resumption whenever session storage changes, after one such change broke resumption for users.

The core idea is simple: a model marking its own homework is the weak point. A separate, watched-over verifier is what makes delegating more of the build to Claude reasonable — and as agentic end-to-end tests mature, that split between builder and judge looks set to define how agent-written software earns trust.

Source: geeky-gadgets.com

More from James Calloway

James Calloway

Show full bio

Senior reporter covering regulation, policy and their impact on Product and interaction design, design systems at Interface Wire.

174 articles

Related articles

« Previous articleNext article »