Clord
Eyeglasses resting in front of a monitor full of code, the lenses bringing the screen into focus

Claude Code Verification Loops: Add Checks, Not Reviewers

Claude Code verification loops, straight from Anthropic's own team, plus fresh Harvard data on the AI code review bottleneck. Here's the cheap half worth copying.

Clord
· · 10 min read

Okay so the AI coding bottleneck moved.

It’s not writing code any more. It’s you, reading what the agent wrote.

The verdict: stop adding reviewers and start adding checks the agent can’t argue with. Copy the cheap half of the Claude Code team’s new verification playbook this week: a Stop hook that runs your fast checks, a verify skill that runs the real app, and three strikes before anything lands on your desk.

The receipts: agents write more, review eats the gains

Two things dropped in the same week.

On 16 November 2026, Anthropic published how the Claude Code team thinks about verification, by Addy Osmani. On 19 November, Harvard’s Fiona Chen and James Stratton posted a new version of their working paper, Artificial Intelligence in the Firm: Bottlenecks in Software Production, built on Jellyfish engineering data: 445 million work events from 720,542 workers at 655 firms, January 2021 to August 2026.

AI coding agents added a further 44.0% in lines of code, 36.0% in commits and 35.7% in pull requests, on top of what assistants like Copilot and Cursor had already added. Resolved Jira issues rose 13.7%, which the authors call borderline significant.

So agents write heaps more code, and only a sliver more of it ships.

The paper’s own summary: “Code review becomes the bottleneck.” After agents arrived, the time from submitting code for review to merging it rose 56.1%, and comments per change rose 38.6%. And 79.1% of the firms already used AI code review tools, yet humans still wrote the overwhelming majority of reviews.

TechRadar and Forkast covered an earlier version in October, which had time to merge up 49%. More data, same bottleneck, caught in 4K.

A skeleton sitting by a lake at sunset, still waiting, reacting to pull requests waiting longer for a human reviewer
my PR, 56% deeper in the review queue

What the Claude Code team actually does

Anthropic says about 90% of the Claude Code team’s code is written and reviewed by Claude. Their fix for the review jam isn’t more reviewers. It’s verification loops, with failing checks deciding what needs a person.

  • Run the change. They rank running the app end to end above tests: the Chrome extension for web, an iOS or Android MCP for mobile, a local service for backend.
  • A verify skill in .claude/skills/ that knows how to boot and drive the app. Claude uses it before committing.
  • Three strikes. If a check still fails after three rounds of fixes, Claude stops and brings in a human.
  • Cheap checks first. Tests, build and lint run before a PR exists, enforced by a hook that runs tests when Claude finishes, or a /goal of a passing suite.
  • Checks the change can’t edit. Their Code Review reads REVIEW.md from the base or default branch, never from the pull request itself, and the docs confirm it.
  • No flaky-test cheats. No skipping, no sleeps, no retrying until green. If Claude can’t find the root cause, it deletes the test and writes down why.
  • One reviewer, several rounds, tuned with REVIEW.md, instead of stacking more reviewers.

That last one is lowkey the spiciest take in the post. And the “can’t edit” rule is the one people skip: if the agent can rewrite the check, you’re cooked.

The expensive half you can skip

The playbook also runs a 39-item reliability checklist, a commit gate with observe and enforce modes, and formal evals of the reviewers themselves.

That’s a funded team protecting a product, not a solo dev on a side quest. One commenter in the Hacker News thread said the piece feels like the product of unlimited tokens, and that near-free practices would do as well. Fair.

SpongeBob getting up from his armchair under the words ight imma head out, then walking out the door, reacting to a 39-item reliability checklist
solo devs reaching item 4 of the 39-item checklist

The cheap half: a Stop hook with three strikes

A Stop hook runs every time Claude finishes responding. If the script exits with code 2, Claude doesn’t stop: it gets your error output as the reason and keeps working (hooks docs).

ngl, that’s the whole trick. The agent can’t hand you red code and call it done.

Add it to .claude/settings.json. The args form runs node directly, so it works the same on Windows, macOS and Linux:

{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "node",
            "args": ["${CLAUDE_PROJECT_DIR}/.claude/hooks/check.mjs"],
            "timeout": 120
          }
        ]
      }
    ]
  }
}

Then the script, with the three strikes built in:

// .claude/hooks/check.mjs
// Stop hook: run fast checks when Claude finishes. Exit 2 sends Claude back to fix them.
// Three strikes, then Claude stops and tells you what's broken.
import { execSync } from "node:child_process";
import fs from "node:fs";
import os from "node:os";
import path from "node:path";

const { session_id } = JSON.parse(fs.readFileSync(0, "utf8"));
const file = path.join(os.tmpdir(), `claude-strikes-${session_id}`);
const strikes = fs.existsSync(file) ? Number(fs.readFileSync(file, "utf8")) : 0;

try {
  // Keep this to checks that take seconds: it runs every time Claude stops.
  execSync("npm test", { cwd: process.env.CLAUDE_PROJECT_DIR, stdio: "pipe" });
  fs.rmSync(file, { force: true });
} catch (err) {
  const n = strikes + 1;
  if (n > 3) {
    fs.rmSync(file, { force: true }); // handover written, let Claude stop
    process.exit(0);
  }
  fs.writeFileSync(file, String(n));
  const tail = `${err.stdout ?? ""}${err.stderr ?? ""}`.slice(-1500);
  process.stderr.write(n < 3
    ? `Checks failed (strike ${n} of 3). Fix the code, not the tests.\n${tail}`
    : `Checks failed 3 times. Stop editing and tell the user what fails and what you tried.\n${tail}`);
  process.exit(2);
}

We ran that script against a tiny Node project with a planted bug, feeding it the JSON a Stop hook receives. Stops one and two exited 2 with the failing assertion attached. Stop three exited 2 with the handover message. Stop four exited 0. Once we fixed the bug, it exited 0 first go.

Leonardo DiCaprio in The Great Gatsby raising a glass under the word cheers, reacting to the hook exiting 0 once the bug was fixed
the hook after the bug fix: exit 0, first go

We didn’t run it inside a live Claude Code session, so the exit codes are tested and the agent’s reaction is the documented behaviour.

Two gotchas. Claude Code overrides a Stop hook after eight continuations in a row with no tool call in between, so it can’t trap the agent forever. And if your suite is already red, fix that first, or the hook nags on every turn.

/goal or a Stop hook?

Both fire after every turn. The difference is who judges.

/goalCommand Stop hook
Where it livesThe current session onlyA settings file, every session in its scope
Who decides “done”A small fast model reading the conversationYour script’s exit code
Runs commands itselfNoYes
Best forAn end state, such as “every call site compiles”Checks that must pass every time

Per the docs, /goal is a session-scoped wrapper around a prompt-based Stop hook, and its evaluator can only judge what Claude has already shown in the conversation.

The pick: a command Stop hook for checks, plus /goal for big jobs with “no test file is modified” written into the condition. One is deterministic. The other is vibes with a rubric.

We tried a property test on our own code

The playbook names three test types worth the effort: end to end, property and differential. Property tests are the quickest of the three to set up, so we pointed fast-check 4.11.0 at a real function from this site: normaliseTag(), which turns post tags into URL slugs.

Five example tests passed. Two properties passed 1,000 random runs each: normalising twice changes nothing, and the output is always URL-safe.

The third, “a tag with visible text never becomes an empty slug”, failed on the first run. fast-check shrank the counterexample to a single {. An emoji tag or 日本語 does the same, and “C++”, “C#” and “C” all collapse to c.

None of the site’s 74 current tags hit it, so it’s a latent bug, not a live one. Our hand-written examples would never have caught it. Skill issue, and it’s ours.

Danny Glover as Roger Murtaugh in Lethal Weapon, staring in shock, reacting to a slug function failing on its first random input
one random input and the slug function folded

That’s the kind of check to hand an agent: cheap, deterministic and loud when it fails.

The verdict

Stop adding reviewers. Add checks the agent can’t argue with.

In the Harvard data, engineers spent only 30 to 40% of their time writing code. Agents sped up that slice and the queue behind it got longer, even though 79.1% of firms already had AI reviewers.

The move for a solo builder this week:

  1. A Stop hook that runs your fast tests and build, three strikes built in.
  2. A verify skill that boots the real app and walks the one flow you care about.
  3. One property test on your gnarliest pure function.
  4. /goal for long jobs, with “no test file is modified” in the condition.

We reckon that’s an afternoon of work. Real talk: it won’t make you read less code overnight, but what reaches you will be the stuff a check couldn’t settle.

FAQ

What is a verification loop in Claude Code?

It is a setup where checks run automatically after Claude works, and failures go back to Claude to fix before a person looks. The Claude Code team builds them from end-to-end runs of the app, tests, hooks and a verify skill, and brings in a human after three failed rounds.

Do AI coding agents make teams ship faster?

They make teams write more code. A Harvard working paper dated 19 November 2026 found AI coding agents added 44.0% to lines of code at adopting firms, while resolved issues rose 13.7% (borderline significant) and the time from review submission to merge rose 56.1%.

What is the difference between /goal and a Stop hook?

Both run after each turn. /goal sets a condition for the current session, and a small model judges it from the conversation without running commands. A Stop hook lives in a settings file, applies to every session in its scope and can run a script; exit code 2 makes Claude keep working.

Sources

All sources checked on 22 November 2026.