New term: Ralph Wiggum loop

2025-07-14 · Publisher : Geoffrey Huntley · Domain : Artificial Intelligence

The Ralph Wiggum loop re-runs a coding agent with the same prompt over and over until the task is done and verified. Devised by Geoffrey Huntley in July 2025, the technique went viral in late 2025 and early 2026.

What changes

  • A plain Bash loop is enough to keep an agent working for hours unattended.
  • Persistence beats precision: each iteration starts from the state of the files.
  • Anthropic released an official Claude Code plugin in December 2025.
  • The technique requires verifiable completion criteria: tests, builds, specs.

### Definition The **Ralph Wiggum loop** (or simply "Ralph") re-runs a coding agent indefinitely with the same prompt. Each iteration starts from a fresh context but finds the work already done in the files and Git history, until a completion criterion is met. ### Origin Developer Geoffrey Huntley described the technique on July 14, 2025 on his blog, in "Ralph Wiggum as a 'software engineer'". He summed it up: "Ralph is a technique. In its purest form, Ralph is a Bash loop", namely `while :; do cat PROMPT.md | claude-code ; done`. The name refers to Ralph Wiggum, the naive but stubborn *Simpsons* character. According to Dex Horthy (HumanLayer), the technique "went viral in the final weeks of 2025". ### What the term covers - A prompt file (PROMPT.md) and a specification split into tasks, handled one per iteration. - Programmatically verifiable completion criteria: tests, builds, checked-off task lists. - Anthropic's official Claude Code plugin (December 2025), which intercepts the agent's exit, feeds back the same prompt and stops on a "completion promise" or a maximum number of iterations. ### Criticism and limits The loop burns many tokens and can spin uselessly on an impossible task, hence the iteration cap. Practitioners stress that its effectiveness comes mostly from upfront planning, not from the tool. It suits verifiable tasks (migrations, refactors) better than design decisions. ### Key takeaway Ralph shows that a minimal harness, a loop plus tests, can keep an agent working autonomously for a long time. Quality then depends entirely on the specification and the checks.

Links

Tags : Vocabulaire, Agents, Code, Harness