Agentic Research

Ralph Wiggum

148,649 stars

Official Anthropic plugin for Claude Code: implements the Ralph technique — a Stop hook intercepts Claude's exit attempts and feeds the same prompt back, creating an in-session while-true self-referential loop until the task completes (declared via --completion-promise, e.g. DONE). /ralph-loop starts it, /cancel-ralph stops it. No external bash loop needed.

First published:2025-11-16
data as of:
2026-09-30

Host

Claude inside the loop holds every tool permission of your session (files, shell, connected MCP servers) and uses them repeatedly — each iteration may read/write files and run commands again, until the model itself declares the completion promise.

The core is Claude Code's Stop hook (hooks/stop-hook.sh) — intercepting session exit is a Claude Code-proprietary hook point; other hosts either lack the event or have entirely different hook machinery (OpenClaw plugin contracts, Hermes hooks/middleware, DSH Cordis events).

Risk

This is an experiment in removing the human gate: completion is judged by the model itself, and a misjudgment means an infinite loop — tokens and API costs keep burning while files are modified round after round. Running Ralph in a session with destructive tools lets an unsupervised agent perform dozens of high-privilege operations in a row. Use it only in disposable environments with a restricted tool surface.

Install prompt

在 Claude Code 的插件管理介面中,從官方 marketplace(claude-plugins-official)安裝 ralph-wiggum;之後用 /ralph-loop 命令加任務描述與完成暗號啟動迴圈,用 /cancel-ralph 停止。使用前請先讀插件 README——它會改變 session 的退出行為。

Paste this to your agent. It deliberately contains no tool subcommands — check the tool's official docs for commands.

Official source Source(148,649 ★)
Host