AI Glossary

Ralph loop

noun phraseCoding agent workflowpreferred in this glossaryinformal

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.

Source: Huntley, Ralph (opens in a new tab) (adapted)

Adapted: describes the post's shell loop and its statement that each iteration has a new context window, and keeps its 'in its purest form' qualifier. Source: Huntley, Ralph (opens in a new tab)

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.

Examples written for this glossary

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

    Documentation explains how a product or system works. Geoffrey Huntley's post describes the technique as a Bash loop.

    Source: Huntley, Ralph (opens in a new tab)

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.

Sources

Cite this term.

CC BY 4.0, attribution required.

This term

Orbyt Labs, Ralph loop (AI Glossary), Nov 14, 2026. https://www.orbytlabs.ai/orbyt-collective/glossary/ralph-loop

The dataset (JSON)

Orbyt Labs Glossaries (Nov 14, 2026), https://www.orbytlabs.ai/glossary#dataset

Last updated .