# Gauntlet loop

The gauntlet loop is an agentic prompting pattern where builder and critic agents iterate against an explicit quality bar with blind comparisons until the output beats a reference.

The gauntlet loop is an [agentic prompting](https://www.wikiprompt.org/wiki/prompt-engineering) pattern in which an AI agent system iterates on a piece of work against an explicit quality bar, using separated builder and critic roles and blind comparisons, until the output beats a concrete reference. The technique was popularized in 2026 by developer Matt Shumer, who coined the name and used it to build "Claude of Duty", a browser game produced end-to-end by agents inside an agentic coding harness.

## How it works

A gauntlet loop starts from two inputs: an ambitious goal and a concrete example of what "great" looks like (the reference). A lead agent then:

1. **Sets the bar.** The reference is treated as the standard to beat, not as inspiration.
2. **Decomposes the artifact** into the smallest parts that can be improved and judged independently.
3. **Assigns builders.** Each important part goes to a builder agent that produces or revises it.
4. **Judges blind.** A separate critic agent with fresh context compares the current output against the reference as a blind A/B test, without knowing which is which.
5. **Finds the largest gap.** If the output loses, the critic names the biggest meaningful difference, which becomes the next build target.
6. **Loops** until the output wins the comparison or a stopping condition is reached.

The separation between builders and critics matters: a fresh-context judge avoids the self-grading bias of a model evaluating its own work, and the blind A/B framing forces concrete comparisons instead of generic praise.

## Requirements and uses

Gauntlet loops run inside agentic harnesses such as [Claude Code](https://www.wikiprompt.org/wiki/claude-code) or Codex, where agents can open files, run code, render results, inspect screenshots and spawn sub-agents. The pattern applies to any artifact that can be inspected and improved: code, websites, product design, marketing assets, writing and research. It belongs to the broader family of [agentic](https://www.wikiprompt.org/wiki/agentic-ai) self-improvement techniques alongside critic-verifier pipelines and judge panels in [multi-agent systems](https://www.wikiprompt.org/wiki/multi-agent-system).

## See also

- [Prompt engineering](https://www.wikiprompt.org/wiki/prompt-engineering)
- [Agentic AI](https://www.wikiprompt.org/wiki/agentic-ai)
- [Multi-agent system](https://www.wikiprompt.org/wiki/multi-agent-system)

---
Source: https://www.wikiprompt.org/wiki/gauntlet-loop
License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/)
Last updated: 2026-09-13T21:50:39.785878+00:00
