A FIELD GUIDE · COMPILED 2026

Loop engineering: you stop prompting the agent and write the loop that prompts it.

I don't prompt Claude anymore. I have loops that are running. They're the ones that are prompting Claude. My job is to write loops.
Boris Cherny, creator of Claude Code confirmed-primary

TL;DR

The short version

  • The unit of work shifted from a single prompt to a running loop that prompts the agent for you.
  • A loop is a goal, a feedback signal, and a stopping condition the agent runs against on its own.
  • Verification is the engine. The loop only progresses when tests, types, or a checker say it did.
  • Memory and receipts let a loop survive context limits and pick up where the last pass left off.
  • You move from writing code to writing the conditions under which code gets written and accepted.
  • Every claim here is tagged by source so you can tell first-hand from second-hand.

The guide

Chapter index

  1. 01 Who Boris Cherny is The person behind Claude Code, and why his take carries weight.
  2. 02 What "the loop" is A plain definition before the jargon takes over.
  3. 03 Three stages of evolution From prompting, to chaining, to writing the loop itself.
  4. 04 Anatomy of a loop Goal, action, feedback, stopping condition: the moving parts.
  5. 05 Verification and memory How a loop knows it made progress and remembers across passes.
  6. 06 Orchestration and tooling The scaffolding that runs many loops without losing the thread.
  7. 07 Receipts and timeline What was said, when, and the trail that backs each claim.
  8. 08 How to apply it yourself Turning the idea into loops you can actually run today.
  9. 09 Example loop patterns Concrete loops for tests, refactors, and review.
  10. 10 Annotated sources Every primary and secondary reference, with notes.
  11. 11 Caveats and open questions Where the evidence thins out and what stays unsettled.

Provenance

How honest is this?

Each claim in the guide carries a tag so you can weigh it. Two tags, plainly defined:

confirmed-primary

The claim traces directly to Boris Cherny, Cat Wu, or Anthropic: their own talk, post, or documentation.

confirmed-secondary

The claim appears only in third-party coverage, so it is reported faithfully but one step removed from the source.

Run it

The agent-loop skill

Reading the method is one thing; running it is another. agent-loop is a companion Claude Code skill that turns this knowledge base into something you can run. It fires on "loop until the tests pass" or "keep going until the build is green" — even when you never say the word "loop."

One loop

Give it a goal and a verification gate. It runs act → verify → re-prompt until the gate passes or a budget ceiling stops it. The loop only advances when a test, a build, or a runnable check says it did.

A chain of loops

A big objective is decomposed into a backbone of stages; any stage fans out one parallel sub-loop per item — a page, a screen, an endpoint — and joins before continuing. A human signs off at the end.

verify-loop.sh --goal "fix the failing auth tests" --verify "pytest tests/auth -q" --max 10

Go deeper

Read the knowledge base

Read the full knowledge base on GitHub