Powered by Claude Code

Write a plan.
Walk away.

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.

Install Documentation
ralphex
$ ralphex docs/plans/add-auth.md
[09:14:22] Task 1: JWT middleware → tests pass → committed
[09:21:08] Task 2: login endpoint → tests pass → committed
[09:28:45] Review 1: 5 agents → 2 issues fixed → committed
[09:35:12] Codex: GPT-5 review → 1 issue reported
[09:41:03] Review 2: 1 fix → committed → no issues
[09:41:17] COMPLETED → docs/plans/completed/

What is ralphex? The extended ralph loop.

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.

Built for Autonomous Execution

Everything you need to run Claude Code autonomously on complex features

Zero Setup

Works out of the box with sensible defaults. No configuration required to get started.

Fresh Context

Each task executes in a new Claude session. No context degradation over long features.

Notifications

Get alerted on completion or failure via Telegram, Email, Slack, Webhook, or custom script.

Multi-Agent Review

5 specialized agents review in parallel: quality, implementation, testing, simplification, docs.

External Codex Review

Optional GPT-5 review for independent analysis. Two AI perspectives catch more issues.

Web Dashboard

Real-time browser UI with SSE streaming, phase navigation, and multi-session support.

Docker Isolation

Run in container for safer autonomous execution. Claude only accesses your project, not the entire system.

Interactive Planning

Create plans through dialogue with Claude. Asks clarifying questions, explores your codebase, writes structured plans.

Git Integration

Automatic branch creation from plan name, commits after each task, and plan completion tracking.

How the Autonomous Loop Works

Four phases take your plan from idea to reviewed, committed code

1

Task Execution

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
2

First Code Review

Launches 5 review agents in parallel via Claude Code's Task tool. Covers quality, implementation correctness, testing, over-engineering, and documentation.

3

Codex External Review

Independent review by GPT-5. Claude evaluates findings, fixes valid issues, iterates until codex reports no issues. Two AI perspectives catch more bugs.

4

Final Review

Quality and implementation agents run one more pass focusing on critical/major issues only. Plan moves to completed/ on success.

Review Agents

Five specialized agents work in parallel to catch different categories of issues

quality Bugs, security issues, race conditions, error handling
implementation Verifies code actually achieves the stated goals
testing Test coverage, edge cases, test quality
simplification Detects over-engineering and unnecessary complexity
documentation Checks if README, comments, or docs need updates

Interactive Plan Creation

Don't have a plan yet? Let Claude help you create one

ralphex --plan
$ ralphex --plan "add caching for API"
[10:30:05] analyzing codebase structure...
[10:30:12] found store layer in pkg/store/
QUESTION: Which cache backend?
› Redis
  In-memory
  File-based
[10:30:45] ANSWER: Redis
[10:32:05] plan written → docs/plans/add-api-caching.md

Codebase Analysis

Claude explores your project structure, finds existing patterns and conventions

Clarifying Questions

Interactive picker (fzf) for design decisions - cache backend, auth method, etc.

Complete Plan File

Generates structured markdown with tasks, checkboxes, and validation commands

Immediate Execution

Option to start implementation right away or save for later

Fully Customizable

Adapt ralphex to your workflow, language, and review standards

Custom Agents

Create domain-specific review agents. Add security checks for fintech, TypeScript linting for frontend, or compliance rules for regulated industries.

~/.config/ralphex/agents/*.txt

Custom Prompts

Control how tasks execute and reviews run. Modify the task prompt, first review, codex integration, or final review phases.

~/.config/ralphex/prompts/*.txt

Per-Project Config

Override global settings per repository. Each project can have its own agents, prompts, and configuration that take priority.

.ralphex/

Use Existing Agents

Reference Claude Code agents you already have installed. No duplication needed - just name them in your prompts.

qa-expert, go-test-expert, ...
Configuration Structure
~/.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

Frequently Asked Questions

Common questions about ralphex, the ralph loop, and supported agents

Is ralphex the ralph loop for Claude Code?

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.

Can I run ralphex with codex instead of Claude Code?

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.

Is ralphex an autonomous coding agent?

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.

Can I run ralphex code review without executing tasks?

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.

What if codex isn't installed?

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.

Where is ralphex on GitHub?

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.

Install

Get started in seconds

Homebrew (macOS)

brew install umputun/apps/ralphex

Go Install

go install github.com/umputun/ralphex/cmd/ralphex@latest

Binary Releases

# download from GitHub releases
github.com/umputun/ralphex/releases