Ralph (aka the Ralph Wiggum loop) is an AI coding technique that runs a coding agent in a loop, with fresh context on every iteration, until a specification is fulfilled.
Ralph was created by Geoffrey Huntley. The core concept is elegantly simple:
while :; do cat PROMPT.md | claude-code ; doneKey principles:
- Run an AI agent repeatedly until a PRD/specification is complete.
- Progress persists in files and Git history, not in context.
- Each iteration starts fresh with clean context.
- Use "backpressure" (tests, lints, type checks) to validate work.
- Philosophy: "Sit on the loop, not in it", or as Huntley puts it: "deterministically bad in an undeterministic world".
Found this useful? ⭐️ Star this repo to help others discover it.
- Official Resources
- Playbooks and Methodology
- Implementations
- Companion Tools
- Vendor Guides
- Tutorials and Guides
- Articles
- Case Studies
- Critiques
- News
- Videos
- Talks
- Podcasts
- Discussions
- Communities
Primary sources from Geoffrey Huntley, the creator of the Ralph technique.
- Ralph Wiggum as a 'Software Engineer' - The definitive introduction. Explains the bash loop, the "tuning like a guitar" metaphor, and the economics of autonomous coding.
- Everything is a Ralph Loop - Deeper exploration covering "reverse mode" clean-rooming, orchestrator patterns, and "The Weaving Loom" concept.
- Don't Waste Your Back Pressure - Backpressure explained: rejecting invalid generations without creating too much resistance.
- I Ran Claude in a Loop for Three Months - Case study: Ralph built CURSED, a Gen Z slang programming language with an LLVM compiler.
- Too Many Model Context Protocol Servers - Context allocation theory, and why Ralph minimizes allocation to avoid compaction.
- Porting Software Has Been Trivial for a While Now - Two-stage Ralph recipe for porting: turn tests into specs, then run a TODO-driven loop.
- Software Development Now Costs Less Than the Wage of a Minimum Wage Worker - Essay on the economic impact of running Ralph loops at scale.
- The Eighteen-Month Recap - Talk write-up from AI Engineer Singapore revisiting Ralph and loop engineering.
- If Your Team Is Too Busy to Learn, You're Preparing Them to Be Replaced - Reflection on Ralph going viral, with reader adoption stories.
Implementation guides covering the 3 Phases, 2 Prompts, 1 Loop workflow.
- How to Ralph Wiggum - Geoffrey Huntley's official playbook covering context management, sandboxing, and prompt patterns.
- ralph-playbook - Methodology guide with diagrams, phase explanations, and "signs & gates" steering techniques.
- Ralph Loop Prompts - Annotated library of copy-paste Ralph prompts, each traced to its original author.
- Advanced Context Engineering for Coding Agents - HumanLayer's Research-Plan-Implement approach to keeping agent context small.
Phase 1: Define requirements. A human and an LLM converse to produce JTBD-aligned specifications.
Phase 2: Plan. Gap analysis generates a prioritized TODO list, with no implementation.
Phase 3: Build. Implement from the plan, run tests, commit, repeat.
project-root/
├── loop.sh # Ralph loop script
├── PROMPT_build.md # Build mode instructions
├── PROMPT_plan.md # Plan mode instructions
├── AGENTS.md # Operational guide (~60 lines max)
├── IMPLEMENTATION_PLAN.md # Prioritized task list (generated)
├── specs/ # Requirement specs (one per JTBD)
└── src/ # Application source code
- Ralph Loop for Claude Code - Anthropic's plugin that uses a Stop hook to re-feed the prompt until a completion promise or iteration cap is reached. Formerly named
ralph-wiggum. - Ralph Loop for Cursor - Cursor's official port of the Stop-hook loop, built from hooks and skills.
- ralph-claude-code - Claude Code loop with exit detection, rate limiting, a circuit breaker, and a response analyzer.
- choo-choo-ralph - Beads-powered 5-phase workflow with structured specs, verified implementations, and compounding knowledge.
- humanize - Ralph loop with an independent Codex review step, built on the official Ralph Loop plugin.
Agent-agnostic loop runners.
- snarktank/ralph - PRD-driven task loop with automatic branching, flowchart visualization, and auto-archiving.
- ralphy - Bash loop that runs Claude Code, Codex, OpenCode, Cursor, Qwen, or Droid until a PRD is complete.
- gnhf - Overnight orchestrator where each iteration makes one small committed change.
- open-ralph-wiggum -
ralph "prompt"CLI for OpenCode, Claude Code, Codex, and Copilot with live status, mid-loop context injection, and struggle detection. - ralphex - Go runner that executes a plan file task by task with Claude Code or Codex, adding plan creation and review stages.
- continuous-claude - Runs Claude Code in a loop that opens PRs, waits for CI, and merges.
- ralph-orchestrator - Rust orchestrator with 7 AI backends, a Hat System for specialized personas, and an interactive TUI.
- chief - Splits work into tasks and runs Claude Code in a fresh-context loop until they are done.
- ralph-starter - CLI with GitHub, Linear, and Notion integrations, multiple agents, workflow presets, and cost tracking.
- PageAI-Pro/ralph-loop - Long-running loop over a task list, packaged for npm.
- fstandhartinger/ralph-wiggum - Spec-driven Ralph setup distributed as an agent skill that the agent installs itself.
- smart-ralph - Turns feature requests into research, requirements, design, and task specs, then executes them task by task.
- loop.js - Fresh-context loop with a separate read-only Verify agent that decides when to stop.
- wreckit - Spec-driven Ralph loop implementation.
- SantanderAI/ralph - Configurable Bash and PowerShell loop that runs any AI coding CLI with a fresh session per iteration.
- nitodeco/ralph - PRD-driven CLI with sequential task execution and an interactive terminal UI.
- oh-my-ralph - Opinionated Ralph loop written in Python.
- ralph-wiggum-bdd - Standalone Bash script for Behavior-Driven Development with a Ralph loop.
- ralph-kit - Conversational project setup, a local Kanban dashboard, and a runner that works with other Ralph implementations.
- ralph-wiggum-cursor - Cursor implementation with token tracking, context rotation at 80k tokens, and interactive setup.
- CodexPotter - Codex runner that keeps reconciling the codebase toward a stated goal using the Ralph pattern.
- aymenfurter/ralph - VS Code extension for GitHub Copilot with a visual control panel, progress timeline, and fresh-chat mode.
- ralph-copilot - Ralph loop for GitHub Copilot.
- gemini-cli-extensions/ralph - Gemini CLI extension for Ralph loops.
- opencode-ralph-loop - Minimal OpenCode plugin that auto-continues until the task is complete.
- pi-ralph-wiggum - Pi extension for Ralph loops.
- neuralyzer - Pi tool that lets the agent wipe its own session context and resend the first message, putting loop control inside the agent.
- ralph-for-kiro - Minimal Ralph CLI for Kiro CLI.
- oh-my-claudecode - Multi-agent orchestration for Claude Code with a
/ralphpersistence mode and aralplanplanning stage. - ralph-tui - Terminal UI orchestrator connecting to task trackers, with interactive PRD creation.
- LoopTroop - Local GUI that plans with an LLM council, runs OpenCode in isolated worktrees, retries from clean context on failure, and gates results on human approval.
- compound-product - Product loop that reads reports, picks priorities, and implements fixes with the Ralph pattern.
- ralph-loop-agent - Vercel's TypeScript SDK wrapper with verification callbacks and context summarization.
- ml-ralph - Autonomous ML agent that runs experiments with Claude or Codex.
- ralph-wiggum-marketer - Claude Code plugin that applies the Ralph loop to copywriting with research agents.
- lisa - Claude Code spec-interview workflow that produces the specs a Ralph loop executes.
- bmalph - BMAD-METHOD planning phases that hand off to snarktank/ralph for execution.
- MartinLoop - Control plane for agent loops with budget stops, verifier gates, rollback evidence, and audit records.
- antiburn - Local desktop app that flags causes of token burn in agent sessions, such as overly deep sessions, broken caching, and unused tools.
- Goose Ralph Loop Tutorial - Block's Goose implementation with cross-model review and recipe-based workflows.
- Copilot SDK Ralph Loop Cookbook - GitHub's recipe for building a Ralph loop with the Copilot SDK.
- Kimi Agent SDK Ralph Loop Example - Moonshot AI's Go example of a Ralph loop.
- Claude Code Goals - Claude Code's built-in
/goalloop, where an evaluator checks a completion condition after each turn. - Using Goals in Codex - OpenAI's cookbook for Codex
/goal, its built-in run-until-done loop.
- Getting Started with Ralph - Step-by-step quickstart with Claude Code and Docker by Matt Pocock.
- 11 Tips for AI Coding with Ralph Wiggum - AFK coding, human-in-the-loop Ralph, iteration caps, and progress tracking.
- ralph-loop-quickstart - Cole Medin's quickstart for the bash-loop version, as an alternative to the plugin.
- Ralph Wiggum Guide - Community-written end-to-end guide.
- The Ralph Wiggum Approach - Stop hook mechanism, troubleshooting, and Q&A.
- Ryan Carson's Step-by-Step Guide - Setting up and running snarktank/ralph, by its author.
- How to Build an Effective Long Running Agent Lo C0A7 op in 7 Minutes - From spec to polished PRD to running the agent with Claude Code, Codex, or OpenCode.
- Patterns for Running Unattended Work - Course lesson on Ralph loops, circuit breakers, human-gated autonomy, and worktree swarms.
- Ralph Cursor Guide - Community guide to running Ralph in Cursor.
- A Brief History of Ralph - Timeline of the technique, including the Y Combinator hackathon story.
- The Real Ralph Wiggum Loop - Contrasts the original bash loop with the philosophy of the Anthropic plugin.
- Entering the Mind of Ralph Wiggum - Long-form explanation of the loop's mechanics and design choices.
- The Ralph Wiggum Loop, from First Principles - External checks decide completion, state lives in the repo, and the agent is replaceable.
- The 'Unpossible' Logic of Ralph Wiggum-Style AI Coding - Analysis of the technique and the plugin controversy.
- Ralph Loops Make Agentic Coding Reliable with Ruthless Context Resets - Dex Horthy on context resets and the Research-Plan-Implement method.
- Self-Improving Coding Agents - Addy Osmani on loop patterns for long-running agents.
- Ralph Wiggum Explained: Tell It What Blocks You - Framing prompts as backpressure instead of wishes.
- The Ralph Wiggum Loop - Autonomous code generation with a fresh context per iteration.
- Decoding the New AI Lingo - GitHub's glossary of loops, harnesses, and squads, including Ralph loops and their token cost.
- Ralph Wiggum Explained: The Claude Code Loop That Keeps Going - How the loop works and why.
- Ralph Wiggum and AI Coding Loops - From Springfield to real-world software automation.
- 2026: The Year of the Ralph Loop Agent - Predictions on the Ralph loop's impact on development.
Firsthand reports from running Ralph loops on real work.
- We Put a Coding Agent in a While Loop - YC Agents hackathon report: a headless Claude Code loop ported 6 repositories overnight.
- The Nightly Ralph Loop - Two weeks of an unattended loop turning GitHub issues into 82 PRs, with the guardrails and the numbers.
- What I Learned Pointing a Ralph Loop at My Product for a Week - 102 verified features, and why verification and human judgment become the bottleneck.
- Long-Running Claude for Scientific Computing - Anthropic research using the Ralph loop to counter "agentic laziness" on long tasks.
- Hardening RalphCI Loops - CircleCI study where loops only finish on green CI, after local-only runs passed CI 1 time in 5.
- How I Got Ralph to Ship Overnight - Rich Tabor's setup and results.
- Ship Features in Your Sleep with Ralph Loops - Geocodio's engineering team running Ralph on a product codebase.
- The Ralph Loop: How I Run Autonomous AI Agents Overnight - Stop hooks, spawn budgets, filesystem memory, and the failures along the way.
- Ralph-Wiggum Is Bad and Anthropic Should Fix It - Argues the plugin's coercive completion prompt conflicts with model honesty.
- What Ralph Wiggum Loops Are Missing - Limits that appear when loops scale.
- Ralph Wiggum Loops: The Downsides - Coherence loss, documentation drift, and cost from a real run.
- Autonomous Loops Need a Scoring Function - Why a loop needs a measurable objective, not just a completion signal.
- Crypto Grifters Are Recruiting Open-Source AI Developers - Warning about token schemes riding on the technique's popularity.
- How Ralph Wiggum Went from The Simpsons to the Biggest Name in AI - VentureBeat on the cultural phenomenon.
- 'Ralph Wiggum' Loop Prompts Claude to Vibe-Clone Commercial Software - The Register on cost claims and Huntley's concerns.
- Thoughtworks Technology Radar: Ralph Loop - Placed in "Assess", noting fresh context per iteration at a high token cost.
- The Ralph Wiggum Loop from 1st Principles - Geoffrey Huntley explains the technique himself.
- Ralph Wiggum Showdown with Geoffrey Huntley - Live coding demo, history, and bash loop vs. Stop hook implementations.
- AI That Works: Ralph Wiggum - 75-minute session on why Ralph works: context windows, control loops, and applications.
- Matt Pocock's Ralph Overview - Practical overview grounded in kanban and requirements discovery.
- We Need to Talk About Ralph - Theo's commentary on putting Claude Code in a while loop.
- I Can't Believe Anthropic Messed Up the Ralph Wiggum - Better Stack compares the plugin with the original loop.
- Ralph Wiggum Is the Final Evolution of Vibe Coding - Cole Medin's walkthrough, paired with his quickstart repository.
- Ralph Wiggum Tutorial: How to Run It Safely and Efficiently - JeredBlu's companion to the written guide.
- The Ralph Loop Explained - Dan Vega's bash-loop walkthrough on a Java project.
- What Ralph Wiggum Loop Really Is - Three-minute explainer from the Goose team.
- Ralph Loops: Build Dumb AI Loops That Ship - Chris Parsons' AI Engineer Europe 2026 workshop on feedback loops, delivery contracts, and human review.
- The Great Loops Debate - AI Engineer World's Fair 2026 debate with Geoffrey Huntley and Dex Horthy on loop hype versus practice.
- The Ralph Wiggum Method Explained - Eddy Vinck at AI Coding Summit 2026.
- Inventing the Ralph Wiggum Loop - Dev Interrupted with Geoffrey Huntley on context rot, compaction, and the $10.42/hour calculation. A transcript is available.
- AI Giants: Geoffrey Huntley - Codacy's long-form interview with the creator of Ralph.
- Is Coding Over? - Geoffrey Huntley on loop engineering, part 1 of Josh Wulf's series.
- Ralph Wiggum Coding Agent Power Tools - BoundaryML on tooling and advanced techniques.
- Ralph Wiggum AI Agent Explained - The Startup Ideas Podcast with Ryan Carson, for founders and builders.
- Ryan Carson Explains the Ralph Wiggum Loop - Tool Use podcast on implementing Ralph with Amp and Claude Code.
Hacker News threads.
- Original HN Discussion - The discussion that helped popularize the technique.
- We Put a Coding Agent in a While Loop - Huntley participated; security concerns raised about default passwords.
- Ralph Wiggum as a Software Engineer - Code quality critiques and maintainability debates.
- Show HN: Continuous Claude - Running Claude Code in a PR-and-CI loop.
- Tips Discussion - Community tips and experiences.
- Ralph from First Principles - Discussion of Huntley's explainer video.
- What Happens After Ralph Wiggum? - The future of autonomous coding patterns.
- Crypto Grifters Are Recruiting Open-Source AI Developers - Debate on the token scheme around Ralph.
- A Brief History of Ralph - Discussion of HumanLayer's timeline.
- What Ralph Wiggum Loops Are Missing - Debate on the limits of naive loops.
- r/RalphCoding - Subreddit for sharing Ralph learnings, resources, and achievements.
- Ralph Discord - Discord server discussing Ralph methods, resources, and achievements.
- Awesome Claude Code - Skills, hooks, slash commands, and plugins for Claude Code.
- Awesome Harness Engineering - Harnesses, loops, and environments for AI agents.
- Awesome Claude: Ralph Wiggum - Reference page with tips and configuration examples.
Contributions welcome! Read the contribution guidelines first.