Ralph for Claude Code
An autonomous development loop for Claude Code that iterates on a project until completion, with intelligent exit detection, rate limiting and a circuit breaker to prevent runaway loops.
Ralph for Claude Code is an implementation of Geoffrey Huntley's technique for running Claude Code in continuous, autonomous development cycles, named after Ralph Wiggum. It repeatedly invokes Claude Code to improve a project until completion, installing once as a command available in any directory.
A dual-condition exit gate requires both a completion indicator and an explicit exit signal before stopping, rate limiting resets hourly with a configurable call cap, and a circuit breaker with a response analyzer detects errors and stuck loops to prevent runaway API use. Sessions can resume with preserved context, expire after a configurable timeout, and stream output live; other features include JSON output with a text-parsing fallback, git backup branches with rollback, desktop notifications, log rotation, a metrics command, and importing a GitHub issue or a PRD as the starting task.
It is written in Shell and released under the MIT license.