AI Agent Loops: Ralph and Sisyphus
TL;DR
Running AI coding agents in infinite loops is hot right now. Ralph is a simple bash loop that says "keep going until done," while Sisyphus is an orchestrator that manages multiple models as a team. Both share the same philosophy of "never give up until complete," but take different approaches.
Why I Wrote This
I've been using Ralph Loop in Claude Code for a while. There's something satisfying about running it before bed and checking the results in the morning. It brought back the feeling I had when trying autonomous agents like AutoGPT.
Then I discovered oh-my-claudecode through a post on the PyTorch Korea community. It's a port of the Sisyphus orchestration concept from OpenCode's oh-my-opencode to Claude Code.
I didn't know why OpenCode was so hot, but after looking into it, there's clearly a good reason. It implements "keep going until done" differently from Ralph, and comparing the two is quite interesting.
This post is also prerequisite knowledge for the next article where I'll introduce Ralplan (Ralph + Plan combined) from oh-my-claudecode.
Ralph: Stupid Simple is the Point

Ralph Wiggum is indeed that Ralph from The Simpsons. Geoffrey Huntley first shared this technique in May 2025, and the core is surprisingly simple:
while :; do cat PROMPT.md | claude ; doneThat's it. Really.
The agent works, thinks it's done and tries to exit, the loop feeds it the same prompt again, and the agent looks at previous work (git history, file changes) to find what to do next. This repeats until the "done" condition is met.
Why "Ralph Wiggum"?
Huntley said he felt like he was going to "ralph" (vomit) when he discovered this technique. He saw the future of software development. Like the Ralph Wiggum character from The Simpsons, it embodies the philosophy of "keep trying even after failing."
Ralph's Core Principles
Start with fresh context every iteration. If conversation history accumulates, you waste context window and the model gets stuck on past failures. Ralph avoids this.
Control the agent with "Backpressure." Instead of "do this," create an environment where "you'll be rejected if you mess up." Tests, lint, and type checks act as gates.
Plans are disposable. If a plan goes off track, don't try to fix it—throw it away and make a new one. Regeneration is cheaper.
Anthropic's Official Plugin
Claude Code has an official Ralph Wiggum plugin:
/ralph-loop "Build a REST API" --completion-promise "COMPLETE" --max-iterations 20However, there's some disappointment in the community about the official plugin. Dex Horthy from HumanLayer tested it and noted that "the core of original Ralph isn't 'run forever' but 'break work into small units with independent context windows.'" The Stop Hook implementation doesn't capture this philosophy well.
Huntley himself said about the official plugin: "It's cute, but I'm worried people will try it and think 'this isn't Ralph.'"
Sisyphus → oh-my-claudecode: Team Orchestrator

Sisyphus was originally the main agent of the Oh My OpenCode project. The name comes from the Greek myth—rolling a boulder up only for it to roll back down, over and over endlessly.
oh-my-claudecode: Ported to Claude Code
Recently, Anthropic restricted third-party apps like OpenCode from using the Claude API through unofficial channels. In response, Yeachan-Heo created oh-my-claudecode, porting oh-my-opencode's concepts natively to Claude Code.
The Key Difference from Ralph
Ralph has a single agent receiving the same prompt repeatedly. oh-my-claudecode operates with 32 specialized agents and 5 execution modes (Autopilot, Ultrapilot, Ecomode, Swarm, Pipeline).
It automatically delegates to agents matching the task type and smartly routes models (simple tasks to Haiku, complex reasoning to Opus). You can switch modes with magic keywords like ralph, ulw, eco.
I'll cover detailed usage in the next post.
Comparison: When to Use What
| Criteria | Ralph | Sisyphus |
|---|---|---|
| Philosophy | Simplicity, repetition | Division of labor, orchestration |
| Setup difficulty | Low (bash script) | Medium (plugin installation) |
| Cost | Single model (varies by choice) | 30-50% savings with smart routing |
| Best for | Single feature, refactoring | Large projects, complex tasks |
| Context management | Fresh start each time | Distributed across specialized agents |
When Ralph is Better
- When you just have one PRD to implement
- When you want to start without any setup
- Simple repetitive tasks (like fixing 8000 lint errors)
When Sisyphus is Better
- When touching frontend + backend + DB together
- When you want speed through parallel processing
- "I don't know how to do this, figure it out" style
Common Ground: "Until Done"
Both share the same core philosophy:
"When the agent says 'I'm done' and tries to leave, say 'not yet' and run it again."
The human's job is to step out of the loop. Instead, sit above the loop and tune the environment. Write thorough tests, add guardrails when the agent struggles, generate new plans when direction goes off.
As Geoffrey Huntley puts it:
"LLMs are amplifiers of operator skill. You won't get good results if you just run it and walk away. You need to babysit."
Wrapping Up
Try them yourself and find what fits your workflow. If you use Claude Code's built-in Ralph plugin, make sure to set --max-iterations. Unless you want an API cost explosion.
Refs
- Ralph Wiggum as a "software engineer" - Geoffrey Huntley - Original Ralph technique post
- A Brief History of Ralph - HumanLayer Blog - Ralph history and official plugin comparison
- Claude Code Ralph Wiggum Plugin - Anthropic GitHub - Official plugin
- oh-my-claudecode GitHub - Yeachan-Heo - Project repository
- oh-my-claude-sisyphus Introduction - PyTorch Korea - Multi-agent orchestration for Claude Code