Agent teams

The Gauntlet Loop: The Three Line Prompt Where Claude Grades Its Own Work

The three line prompt that makes Claude build, judge and rebuild its own work until a separate critic agent runs out of complaints

6min read
22numbered steps
9sections

What this actually is

The Gauntlet Loop is a way of writing one prompt so that you stop being the person who checks the output. Instead of you reading a result and asking for another pass, the prompt sets up two kinds of agent and lets them argue until the work clears a bar you defined at the start.

It was named and popularised by Matt Shumer, and it spread on the back of one demo he called Claude of Duty: a playable browser shooter, roughly 55,000 lines of Three.js, produced from a single prompt by Claude Opus 5. The demo is the reason people are copying it. The mechanism is the reason it works.

Boris Cherny, who built Claude Code, describes his own day the same way. His words: "My job is to write loops."

Why checking your own work is the part that fails

Every agent workflow that disappoints has the same shape. One model does the job, then the same model is asked whether the job is good, and it says yes. This is not laziness in the model and it is not a prompt you can nag your way out of.

  1. An agent that just produced something has the whole production in its context. It knows why every decision was made, so every decision looks justified. That is the definition of a bad reviewer.
  2. Without a reference, "is this good" has no answer. The model will produce a plausible score because you asked for one, and the score will move around between runs because there is nothing anchoring it.
  3. A single agent optimises for finishing. It has a task list and it wants the list done, so "good enough" arrives exactly when the steps run out rather than when the quality arrives.

The fix is structural, not verbal. You need a second agent that has never seen the attempt, holding the output against something concrete, and you need the loop to end on the critic's verdict rather than on the builder's step count.

The three lines

The prompt is short. Only the third line is unusual, and it is the one people leave out.

  1. Line one: the task, plus a concrete example of what great looks like. Not an adjective. A real reference the model can open, read and measure itself against.
  2. Line two: split the job into the smallest pieces that can be judged on their own, and give each piece its own builder agent with its own context.
  3. Line three: give each piece a separate critic agent, with fresh context, whose job is to inspect the real output, compare it directly against the bar, name the single biggest remaining gap, and send it back.

The loop is then implicit: builder produces, critic rejects with one named gap, builder rebuilds against that gap, critic looks again. It ends when the critic has nothing left to raise.

The prompt, written out

Adapt the nouns, keep the structure. The three numbered clauses are doing all the work.

  • Build me [the thing]. Here is what great looks like: [link, file, screenshot, or a named product to match]. Treat that as the bar.
  • Break this into the smallest pieces that can be judged independently. For each piece, spawn a builder subagent with its own context and give it that piece only.
  • For each piece, also spawn a separate critic subagent with fresh context. The critic must open the actual output, compare it against the bar, name the single largest remaining gap, and send it back to the builder. The builder never grades its own work. Repeat until the critic has no further gap to raise, or until [N] rounds, whichever comes first.

The bracketed round cap in the last clause is not optional. See the section on cost below.

Free, for your email

Get the full setup steps + the copy-paste setup prompt

The rest of this guide (5 more sections) opens right here. The setup prompt, one paste into Claude that sets it all up, comes by email only. Use your real address.

Unlocks: Why the separate critic is the whole trick · Running it without burning your month · When it does not work · A checklist before you press go · What to know before you start

50,000+ follow where these guides come from. No spam, reply “unsubscribe” any time.

Read next