The autonomous Claude Code loop for plan execution and multi-agent code review. Each task runs in a fresh session, keeping Claude sharp from start to finish.
ralphex is an autonomous orchestrator of coding agents — the extended ralph loop. It doesn't write code itself; it drives Claude Code, codex, GitHub Copilot CLI, or any compatible agent through a structured plan. Tasks execute one by one in fresh agent sessions, followed by multi-agent code review with five specialized AI reviewers in parallel. Unlike a simple ralph loop that re-runs the same prompt until it works, ralphex manages structured plans, commits after each task, and orchestrates multi-phase reviews including optional GPT-5 cross-validation through codex. Use it as a ralph loop for Claude Code, a ralph loop for codex, or with any agent that produces compatible output.
Everything you need to run Claude Code autonomously on complex features
Works out of the box with sensible defaults. No configuration required to get started.
Each task executes in a new Claude session. No context degradation over long features.
Get alerted on completion or failure via Telegram, Email, Slack, Webhook, or custom script.
5 specialized agents review in parallel: quality, implementation, testing, simplification, docs.
Optional GPT-5 review for independent analysis. Two AI perspectives catch more issues.
Real-time browser UI with SSE streaming, phase navigation, and multi-session support.
Run in container for safer autonomous execution. Claude only accesses your project, not the entire system.
Create plans through dialogue with Claude. Asks clarifying questions, explores your codebase, writes structured plans.
Automatic branch creation from plan name, commits after each task, and plan completion tracking.
Four phases take your plan from idea to reviewed, committed code
Reads your plan, executes tasks one by one. Runs validation commands (tests, linters) after each task. Marks checkboxes complete and commits.
ralphex docs/plans/feature.md
Launches 5 review agents in parallel via Claude Code's Task tool. Covers quality, implementation correctness, testing, over-engineering, and documentation.
Independent review by GPT-5. Claude evaluates findings, fixes valid issues, iterates until codex reports no issues. Two AI perspectives catch more bugs.
Quality and implementation agents run one more pass focusing on critical/major issues only. Plan moves to completed/ on success.
Five specialized agents work in parallel to catch different categories of issues
Don't have a plan yet? Let Claude help you create one
Claude explores your project structure, finds existing patterns and conventions
Interactive picker (fzf) for design decisions - cache backend, auth method, etc.
Generates structured markdown with tasks, checkboxes, and validation commands
Option to start implementation right away or save for later
Adapt ralphex to your workflow, language, and review standards
Create domain-specific review agents. Add security checks for fintech, TypeScript linting for frontend, or compliance rules for regulated industries.
~/.config/ralphex/agents/*.txt
Control how tasks execute and reviews run. Modify the task prompt, first review, codex integration, or final review phases.
~/.config/ralphex/prompts/*.txt
Override global settings per repository. Each project can have its own agents, prompts, and configuration that take priority.
.ralphex/
Reference Claude Code agents you already have installed. No duplication needed - just name them in your prompts.
qa-expert, go-test-expert, ...
~/.config/ralphex/
├── config # settings (INI format)
├── prompts/
│ ├── task.txt # task execution
│ ├── review_first.txt# 5-agent review
│ ├── review_second.txt# final 2-agent review
│ └── codex.txt # external review
└── agents/
├── quality.txt # bugs, security
├── implementation.txt
├── testing.txt
├── simplification.txt
└── documentation.txt
Common questions about ralphex, the ralph loop, and supported agents
Yes — ralphex is an extended ralph loop. The original ralph loop, popularized by Geoffrey Huntley, runs the same prompt against an agent until the work is done. ralphex keeps that core idea but adds structured plans, per-task fresh sessions, and a multi-phase review pipeline. It works as a ralph loop for Claude Code out of the box, and supports codex, GitHub Copilot CLI, Cursor CLI, and other compatible agents through wrapper scripts.
Yes. ralphex ships with a codex-as-claude wrapper script that translates
codex output into ralphex's stream-json protocol. Point claude_command at
the wrapper in your config and ralphex drives codex through the same task and review
loop. The same approach works for GitHub Copilot CLI, Cursor CLI, or any agent with a
compatible streaming output. See the
custom providers documentation
for details.
Not quite. ralphex is an autonomous orchestrator of coding agents — it doesn't write code itself. It drives an underlying agent (Claude Code, codex, Copilot CLI) through a structured plan, runs tests, commits work, and coordinates multi-phase reviews. The agent does the writing; ralphex provides the loop, the discipline, and the cross-validation.
Yes — ralphex --review runs the full multi-agent review pipeline on
changes already on the current branch. This works regardless of how the changes were
made: Claude Code's plan mode, manual edits, another AI agent, or any other workflow.
No plan file is required; if you provide one it adds context for the reviewers.
The codex external review phase is optional — if codex isn't installed, ralphex
skips it automatically and runs only the Claude-based review phases. You can also use
--external-only to run just the codex cross-validation pass on existing
branch changes.
The source for ralphex lives at github.com/umputun/ralphex. Issues, discussions, and releases are all there. The project is open source under the MIT license.
Get started in seconds