ralphex - The Extended Ralph Loop for Claude Code and codex

3 min read Original article ↗

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 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/

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.

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.