ralph-claude-code
frankbria/ralph-claude-code
Autonomous AI development loop with intelligent exit detection
Overview
Ralph is an autonomous AI development tool that helps Claude Code iteratively improve projects, complete them autonomously with safeguards to avoid infinite loops and excessive API usage.
Categories
Tags
Similar tools
ECC
affaan-m/ECC
affaan-m/ECC
hermes-agent
NousResearch/hermes-agent
nousresearch/hermes-agent
AutoGPT
Significant-Gravitas/AutoGPT
AutoGPT
ollama
ollama/ollama
Local inference runtime and CLI for open-weight large language models
prompts.chat
f/prompts.chat
f/prompts.chat
JavaGuide
Snailclimb/JavaGuide
Java guide for backend interviews & AI application development covering system design, LLMs, Agents, and RAG.
Install
git clone https://github.com/frankbria/ralph-claude-codeREADME
Ralph for Claude Code
Autonomous AI development loop with intelligent exit detection and rate limiting
Ralph is an implementation of the Geoffrey Huntley's technique for Claude Code that enables continuous autonomous development cycles he named after Ralph Wiggum. It enables continuous autonomous development cycles where Claude Code iteratively improves your project until completion, with built-in safeguards to prevent infinite loops and API overuse.
Install once, use everywhere - Ralph becomes a global command available in any directory.
Project Status
Version: v0.11.5 - Active Development Core Features: Working and tested Test Coverage: 784 tests, 100% pass rate
What's Working Now
- Autonomous development loops with intelligent exit detection
- Dual-condition exit gate: Requires BOTH completion indicators AND explicit EXIT_SIGNAL
- Rate limiting with hourly reset (100 calls/hour, configurable)
- Circuit breaker with advanced error detection (prevents runaway loops)
- Response analyzer with semantic understanding and two-stage error filtering
- JSON output format support with automatic fallback to text parsing
- Session continuity with
--resumeflag for context preservation (no session hijacking) - Session expiration with configurable timeout (default: 24 hours)
- Modern CLI flags:
--output-format,--allowed-tools,--no-continue - Interactive project enablement with
ralph-enablewizard .ralphrcconfiguration file for project settings- Live streaming output with
--liveflag for real-time Claude Code visibility - Log rotation:
ralph.logrotates at 10MB, keeping 4 archived files - Dry-run mode (
--dry-run) to simulate loops without API calls - Metrics tracking with
ralph-statsanalytics command (JSON Lines per-loop metrics) - Desktop notifications (
--notify) for key loop events (macOS/Linux/terminal-bell) - Automatic git backup branches (
--backup) with--rollbackrestore - Multi-line error matching for accurate stuck loop detection
- 5-hour API limit handling with user prompts
- tmux integration for live monitoring
- PRD import functionality
- GitHub issue import:
ralph-import --github-issueplus metadata filters (labels, title, assignee, milestone, state) with first/interactive/priority selection and--dry-runpreview - CI/CD pipeline with GitHub Actions
- Dedicated uninstall script for clean removal
Recent Improvements
v0.11.5 - Community Bug Fixes (latest)
- Fixed API limit false positive: Timeout (exit code 124) no longer misidentified as API 5-hour limit (#183)
- Three-layer API limit detection: timeout guard → structural JSON (
rate_limit_event) → filtered text fallback - Unattended mode: API limit prompt now auto-waits on timeout instead of exiting
- Fixed bash 3.x compatibility:
${,,}lowercase substitution replaced with POSIXtr(#187) - Added 8 new tests for API limit detection (548 → 566 tests)
v0.11.4 - Bug Fixes & Compatibility
- Fixed progress detection: Git commits within a loop now count as progress (#141)
- Fixed checkbox regex: Date entries
[2026-01-29]no longer counted as checkboxes (#144) - Fixed session hijacking: Use
--resume <session_id>instead of--continue(#151) - Fixed EXIT_SIGNAL override:
STATUS: COMPLETEwithEXIT_SIGNAL: falsenow continues working (#146) - Fixed ralph-import hanging indefinitely (added
--printflag for non-interactive mode) - Fixed ralph-import absolute path handling
- Fixed cross-platform date commands for macOS with Homebrew coreutils
- Added configurable circuit breaker thresholds via environment variables (#99)
- Added tmux support for non-zero
base-indexconfigurations - Added 13 new regression tests for progress detection and checkbox regex
v0.11.3 - Live Streaming & Beads Fix
- Added live streaming output mode with
--liveflag for real-time Claude Code visibility