Ralph loop
Also called Ralph
Source: Huntley, Ralph (opens in a new tab)Technique that, in its purest form, runs an AI coding agent inside a Bash loop, handing it the same prompt file on every pass so each pass starts a new run.
In plain language
Start another agent run with the same prompt each time the loop repeats.
In a sentence
- The developer used a Ralph loop to start successive runs from the same prompt file.
- Each pass through the Ralph loop began a new agent run.
Usage note
The cited implementation reuses a prompt file on each pass. Repetition alone does not establish that a task has been completed correctly.
Publication
Documentation explains how a product or system works. Geoffrey Huntley's post describes the technique as a Bash loop.
See also
- Spec-driven development
Way of building software with AI in which a written specification comes before the code and serves as the source of truth for the human and the AI.
- Background agent
Coding agent that works on a task in its own remote environment, such as an isolated virtual machine in the cloud, instead of on the developer's local machine, so the developer can delegate the task rather than pair with the agent in real time.
Cite this term.
CC BY 4.0, attribution required.
Orbyt Labs, Ralph loop (AI Glossary), Nov 14, 2026. https://
Orbyt Labs Glossaries (Nov 14, 2026), https://
Last updated .