Ralph Wiggum Loop

Unlimited autonomous iteration pattern in Claude Code. The Ralph Wiggum plugin launches a loop: Claude attempts the task, evaluates the result, retries until success or max iterations. Useful for tasks with clear success criteria (passing tests, clean build, zero linter warnings). The original version, described by Geoffrey Huntley, is one line of bash feeding the same instruction file to the agent, with a fresh context window every round: the agent does not drag the history of its failed attempts, it only keeps what is written to disk (the code, the tests, the plan). The `/goal` commands in Codex and Claude Code are its native descendants, with one big difference: they stay in the same session, and in Claude Code a second, smaller model decides after each turn whether the condition holds. Named after the Simpsons character who "keeps trying until he gets it".

Strengths

Limitations

Best for

Official site

View on Coeurdar