BlogGuides

Running the Gauntlet Loop in Claude Code: /loop, Ultracode and Subagents

What /loop and ultracode actually do in the original prompt, the minimal Claude Code setup, and the plain-words port for any other agent.

Running the Gauntlet Loop in Claude Code: /loop, Ultracode and Subagents

Running the Gauntlet Loop in Claude Code: /loop, Ultracode and Subagents

The gauntlet loop was born in Claude Code, and two of its magic words in the original prompt are Claude Code features. Here is what they do, and how to run a gauntlet anywhere else.

The two magic words

  • /loop reruns a prompt until you stop it or a condition is met. In the gauntlet, it is the engine of "keep going until the critic is wowed": the loop literally re-fires the improve-compare cycle instead of trusting the model to persist on its own.
  • ultracode opts the session into multi-agent orchestration: the main agent can fan out builder sub-agents and critic sub-agents in parallel. That is what "fan out sub-agents" leans on: builders and critics as genuinely separate contexts, not role-play inside one context.
  • Shumer's original prompt uses both, plus one more structural trick worth copying: an architecture contract (in Claude of Duty, a file defining subsystem interfaces and directory ownership) so parallel builders do not trample each other.

    The minimal Claude Code setup

  • Write your gauntlet prompt from the template: goal, named bar, split, builder+critic, earned exit.
  • Paste it into a fresh session - fresh matters, the critic must not inherit context.
  • Make the bar fetchable from the machine: a URL the agent can screenshot, a file it can read, a repo it can run.
  • Walk away. The exit is the critic's blind pick flipping, not your patience.
  • No Claude Code? Same structure, plain words

    The pattern ports to any agent framework: replace /loop with "keep looping until the critic picks ours; never stop after a fixed number of rounds", and replace ultracode with "run the builders and critics as parallel subagents with separate contexts". The RoboNuggets skill that popularized the reusable version does exactly this swap for non-Claude agents.

    The structure is the technique; the platform just decides how much of it runs unattended. Deep-dive the design choices in the critic piece and the annotated original.

    Tags
    gauntlet-loop·agent-loop·prompt-engineering·claude-code·builder-critic·agents