Skip to content

Open Ralph Wiggum

Type `ralph "prompt"` to start open code in a ralph loop. Also supports a prompt file & status check. Open Code, Claude Code, Codex, Copilot

Install

$npm install -g @th0rgal/ralph-wiggum

Install command taken from the project's README or registry entry. Always review code before running it.

Open Ralph Wiggum Autonomous Agentic Loop for Claude Code, Codex, Copilot CLI, Cursor Agent, Qwen Code & OpenCode

Works with Claude Code, OpenAI Codex, Copilot CLI, Cursor Agent, Qwen Code, and OpenCode — switch agents with --agent. Based on the Ralph Wiggum technique by Geoffrey Huntley

Supported Agents • What is Ralph? • Installation • Quick Start • Commands

Tired of agents breaking your local environment? 🏝️ sandboxed.sh gives each task an isolated Linux workspace. Self-hosted. Git-backed.

💬 Join the community: relens.ai/community


Supported Agents

Open Ralph Wiggum works with multiple AI coding agents. Switch between them using the --agent flag:

Agent Flag Description
Claude Code --agent claude-code Anthropic's Claude Code CLI for autonomous coding
Codex --agent codex OpenAI's Codex CLI for AI-powered development
Copilot CLI --agent copilot GitHub Copilot CLI for agentic coding
Cursor Agent --agent cursor-agent Cursor Agent CLI for headless AI coding
Qwen Code --agent qwen-code Alibaba's Qwen Code CLI for headless AI coding
OpenCode --agent opencode Default agent, open-source AI coding assistant
# Use Claude Code
ralph "Build a REST API" --agent claude-code --max-iterations 10

# Use OpenAI Codex
ralph "Create a CLI tool" --agent codex --max-iterations 10

# Use Copilot CLI
ralph "Refactor the auth module" --agent copilot --max-iterations 10

# Use Cursor Agent
ralph "Add unit tests" --agent cursor-agent --max-iterations 10

# Use Qwen Code
ralph "Add unit tests" --agent qwen-code --max-iterations 10

# Use OpenCode (default)
ralph "Fix the failing tests" --max-iterations 10

What is Open Ralph Wiggum?

Open Ralph Wiggum implements the Ralph Wiggum technique — an autonomous agentic loop where an AI coding agent (Claude Code, Codex, Copilot CLI, Cursor Agent, Qwen Code, or OpenCode) receives the same prompt repeatedly until it completes a task. Each iteration, the AI sees its previous work in files and git history, enabling self-correction and incremental progress.

This is a CLI tool that wraps any supported AI coding agent in a persistent development loop. No plugins required — just install and run.

# The essence of the Ralph loop:
while true; do
  claude-code "Build feature X. Output DONE</promise> when complete."  # or codex, copilot, cursor-agent, qwen, opencode
done

Why this works: The AI doesn't talk to itself between iterations. It sees the same prompt each time, but the codebase has changed from previous iterations. This creates a powerful feedback loop where the agent iteratively improves its work until all tests pass.

Multi-Agent Flexibility

Switch between AI coding agents without changing your workflow:

  • Claude Code (--agent claude-code) — Anthropic's powerful coding agent
  • Codex (--agent codex) — OpenAI's code-specialized model
  • Copilot CLI (--agent copilot) — GitHub's agentic coding tool
  • Cursor Agent (--agent cursor-agent) — Cursor's headless AI coding agent
  • Qwen Code (--agent qwen-code) — Alibaba's Qwen Code headless CLI agent
  • OpenCode (--agent opencode) — Open-source default option

Key Features

Similar plugs

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

PluginDev tools+581 this week

CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies

Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro,…

Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…

Explore related