Skip to content

Ralph Claude Code

Autonomous AI development loop for Claude Code with intelligent exit detection

Install

$pip install e2b

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

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 --resume flag 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-enable wizard
  • .ralphrc configuration file for project settings
  • Live streaming output with --live flag for real-time Claude Code visibility
  • Log rotation: ralph.log rotates at 10MB, keeping 4 archived files
  • Dry-run mode (--dry-run) to simulate loops without API calls
  • Metrics tracking with ralph-stats analytics command (JSON Lines per-loop metrics)
  • Desktop notifications (--notify) for key loop events (macOS/Linux/terminal-bell)
  • Automatic git backup branches (--backup) with --rollback restore
  • 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-issue plus metadata filters (labels, title, assignee, milestone, state) with first/interactive/priority selection and --dry-run preview
  • CI/CD pipeline with GitHub Actions
  • Dedicated uninstall script for clean removal

Recent Improvements

Unreleased - Security: .ralphrc is parsed as data (#346)

  • .ralphrc is no longer executed with source: only KEY=VALUE lines for known keys are applied, with literal values. Shell syntax ($VAR, $(...), chained commands) is rejected with a warning — breaking for .ralphrc files that relied on it
  • CLAUDE_CODE_CMD, RALPH_SHELL_INIT_FILE, SANDBOX_DOCKER_IMAGE, SANDBOX_E2B_TEMPLATE and SANDBOX_DOCKER_NETWORK (no host) accept only stock values from .ralphrc; set custom values as environment variables (or --sandbox-* flags). Applies to ralph, ralph-import and ralph-queue. See docs/CLI_OPTIONS.md

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.

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