seif.dev
AI-ASSISTED · FROM MY VIDEO · TEXT BY MY AGENTSBY SEIF SGAYER · · 7 MIN READ

Gauntlet loop: make Claude check its own work

TL;DR

  • A gauntlet loop is a prompt for an agent like Claude Code. Claude splits the job between subagents, gives each one a separate critic, and sends the work back until the critic says it beats a real example you named.
  • Matt Shumer named it in July 2026. His original prompt is three short paragraphs and free to read.
  • It uses a lot of tokens, because every builder and every critic is its own subagent. So build a rough version yourself first, and loop one part of it with a budget.
  • The critic needs a bar it can open, like a live page or a repo. With "make it perfect" it has nothing to compare against.

What is the gauntlet loop?

A gauntlet loop is a prompt that makes an AI agent build each part of a job with one subagent and judge it with another, round after round, until the work beats a real example you named.

Right now you are Claude's quality checker. It builds something, you find what's wrong, and you prompt it again and again. The gauntlet loop hands that job back to Claude.

Matt Shumer gave the technique its name on 27 July 2026, a few days after he posted a browser shooter that Claude Opus 5 built from one prompt in Claude Code. The game is Claude of Duty. Its README says it has roughly 55,000 lines of code and no art files: every texture, model, animation and sound is made by code. People called the video fake, so he published the prompt and the code.

His guide says the same method works for code, websites, writing and research, as long as the result can be looked at and compared.

How does a gauntlet loop work?

You tell Claude what to build, and it splits the work between subagents. Every subagent gets a critic that checks its part, and Claude "doesn't stop until every critic is goated", as I put it in the video.

Shumer's guide breaks that into four parts:

PartWho does itWhat happens
The baryouYou name a real example of great work that the agent can open: a live site, a published article, a repo with its tests.
The splitthe lead agentIt cuts the goal into the smallest pieces that can be improved and judged alone. You don't list them.
Builder and critictwo subagents per pieceThe builder makes the piece. A fresh critic, with no idea how the builder got there, puts it next to the bar and picks the better one.
The loopthe lead agentWhen the bar wins, the critic names the biggest gap and the builder fixes it. There is no fixed number of rounds.

Shumer calls the bar the most important part. He writes that "make it amazing" is not a bar: the agent needs something real to open and compare against. For his game the bar was real Call of Duty screenshots, and the critic had to compare the two blind and say which looked better.

The critic has to be a separate agent. In Claude Code, each subagent runs in its own context window, so the critic never sees the builder's reasons for its choices. More on context windows in why Claude forgets your project.

It needs an agent that can run code and start other agents. Shumer's guide says not to paste a gauntlet loop into a normal Claude chat and expect the same result.

Gauntlet loop prompt: the original and one to paste

Three free places to get the prompt:

WhatWhereLicence
The original prompt behind Claude of Dutyprompt.md in Shumer's repoMIT
A meta-prompt that writes a gauntlet loop for your goalthe "Build your own" section of Shumer's guidefree to read
A Claude Code skill that does the same from a slash commandrobonuggets/gauntlet-loop, by Jay E at RoboNuggetsCC BY 4.0

The originals start from nothing and run until you stop them. If you already have a first version and a usage limit, try this shorter one. Fill in the three brackets:

Polish [WHAT I BUILT] in this repo. Don't rebuild it and don't add features.

The bar is [A REAL PAGE, APP OR REPO THE CRITIC CAN OPEN]. Open the real
thing first and compare against it, not against a description of it.

Split the work into the smallest parts that can be judged alone. For each
part, start one subagent to improve it and a second subagent with fresh
context as the critic. The critic looks at the real output next to the
bar, says which one is better and names the biggest gap. If ours loses,
the builder fixes that gap and the critic checks again.

Stop when every critic picks ours, or when you have used [MY BUDGET, FOR
EXAMPLE 2 HOURS]. Then list every part that still loses.

It is adapted from Shumer's prompt and the RoboNuggets template, with two changes from the video: it starts from what you built, and it has a budget. This wording is new for this post and has not been run on a project yet. Shumer's original is the one behind Claude of Duty.

Don't write "keep improving the landing page until it's perfect". Nothing tells the critic what perfect looks like, so it approves the work.

Do name the bar: "The bar is the pricing page of [a product you admire], screenshotted at the same width as ours."

How many tokens does a gauntlet loop use?

Here's the catch: loops eat a lot of tokens.

None of the sources gives a number, and it depends on how long you let it run. What the docs do say:

  • Every subagent sends its own requests, and they count toward the same usage limits as your main chat (Claude Code docs). A gauntlet loop has two subagents per piece, and each round adds more requests.
  • Shumer's prompt ends with the word ultracode, which asks Claude Code to plan the task as a multi-agent workflow. The workflow docs say a session with ultracode on uses more tokens per request and reaches a session or weekly limit sooner.
  • His own run took many hours, and his guide says ultracode "costs much more".

Three ways to spend less:

  1. Put a budget in the prompt, like the last line of the prompt above. Shumer's guide lists "as much compute as you are willing to spend" as a fair reason to stop.
  2. Loop one part, not the whole product: the checkout page, not the shop.
  3. Run simple subagents on a smaller model. The docs show how to choose a model per subagent.

If you hit the wall anyway, here is how I stopped running out of my Claude usage limit.

Build a simple version first, then loop to polish it

This part is my advice, not part of Shumer's method. His run started from an empty folder.

So first build a simple version yourself, then loop to polish it. Otherwise it perfects the wrong thing.

The loop polishes whatever your prompt describes. If the prompt describes the wrong product, the tokens go into a polished version of the wrong product. A rough version you built yourself shows you what you want before the expensive part starts, and the prompt above then tells Claude to polish it without rebuilding it.

What breaks a gauntlet loop?

The RoboNuggets README lists four ways a run goes wrong:

What goes wrongWhat you seeTry this
A vague barthe critic invents a comparison and approves everythingname one thing the critic can open
The builder judges its own workevery round passesa critic with fresh context
A soft criticscores drift up each roundask for a pick between two, not a score out of 10
A fixed number of roundsit stops while gaps are leftstop when yours wins, or at your budget

When many subagents change one product, the parts can stop matching each other. Shumer's guide suggests one fresh agent at the end of each big wave whose only job is to make the pieces fit together.

Gauntlet loop skill for Claude Code

If you don't want to write the prompt by hand, the RoboNuggets skill writes it for you. Install it into one project:

git clone https://github.com/robonuggets/gauntlet-loop
cp -r gauntlet-loop/.claude/skills/gauntlet-loop your-project/.claude/skills/

Then type your goal after the command:

/gauntlet-loop build me a pricing page for my SaaS

Its README says it offers two or three bars, you pick one, and it hands back one prompt of about 150 words to paste into a fresh session. It won't accept a bar that isn't a named thing the critic can fetch and compare.

Shumer's prompt also uses /loop. That is a Claude Code command that runs a prompt on repeat while the session stays open (docs). I compare it with routines and Desktop tasks in Claude routines.

FAQ

Who invented the gauntlet loop? Matt Shumer named it in July 2026, after he posted Claude of Duty. A builder checked by a separate judge is older than the name: Anthropic describes it as the evaluator-optimizer pattern in Building effective agents.

Does the gauntlet loop work outside Claude Code? Shumer's guide names Claude Code and Codex. The RoboNuggets README says its skill swaps the two Claude Code words, /loop and ultracode, for plain instructions on other agents.

Is the gauntlet loop free? The prompt, the guide and the skill are free. The run uses your Claude plan's usage, or API tokens you pay for.

When should I stop a gauntlet loop? Shumer stopped his while the game was still improving. His guide gives three reasons to stop: you like the result, the gains are too small to matter, or you have spent what you wanted to spend.

New to Claude? Start with AI from zero.

AI-ASSISTED · FROM MY VIDEO

I try my best to bring you value. My AI agents write these. Tell me if it was valuable, or AI slop.

Was this worth your time?

One tap. No sign-in. We save the vote, not who you are.

WRITTEN BY

Hi, I'm Seif Sgayer.

I'm a software engineer with 10+ years of shipping software. I build with AI every day and I teach what works.

Get the next post.

One free AI bite a week, from my own work. Only your email.