ralph-orchestrator: Agent for Claude Code

.claude/agents/ralph-loop-runner.md

ralph-loop-runner is an agent for Claude Code from mikeyobrien/ralph-orchestrator. It costs 286 tokens per session (1,013 once invoked), scanned A, original, MIT.

An agent for running and checking a complete Ralph orchestration loop, where Ralph repeatedly coordinates coding tasks until the process finishes or stops.

In plain words
What is it for?
Use it to test Ralph prompts, monitor loop progress, capture created results and scratchpad state, and diagnose runtime problems.
Why use it?
It helps reveal whether the loop actually completes and records failures such as test errors, parsing problems, tool failures, or exhausted iteration limits.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is mikeyobrien/ralph-orchestrator's own configuration. It tells Claude Code how to work on ralph-orchestrator itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ralph-orchestrator configures →

About the project

Ralph Orchestrator is a framework that repeatedly runs AI-agent tasks until they finish or reach an iteration limit. Developers use it to coordinate autonomous coding work through command-line, web-dashboard, and MCP-server interfaces, with state managed per workspace. The catalogue entries provide agent skills, agents, instructions, and plugins for operating Ralph.

mikeyobrien/ralph-orchestrator · 3,186 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to mikeyobrien/ralph-orchestrator. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/mikeyobrien/ralph-orchestrator/main/.claude/agents/ralph-loop-runner.md
Clone the repo
git clone --depth 1 https://github.com/mikeyobrien/ralph-orchestrator

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ralph-loop-runner

README.md
[![agentmods](https://agentmods.dev/badge/agents/mikeyobrien/ralph-orchestrator/ralph-loop-runner/github.svg)](https://agentmods.dev/agents/mikeyobrien/ralph-orchestrator/ralph-loop-runner)
Your own site
<a href="https://agentmods.dev/agents/mikeyobrien/ralph-orchestrator/ralph-loop-runner"><img src="https://agentmods.dev/badge/agents/mikeyobrien/ralph-orchestrator/ralph-loop-runner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ralph-loop-runner

Your own site · 80×15
<a href="https://agentmods.dev/agents/mikeyobrien/ralph-orchestrator/ralph-loop-runner"><img src="https://agentmods.dev/badge/agents/mikeyobrien/ralph-orchestrator/ralph-loop-runner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 286 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,013 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00286 $0.01013
Opus 5.5 $0.00114 $0.00405
Sonnet 5.5 $0.00057 $0.00203
Haiku 4.5 $0.00029 $0.00101

Measured 1mo ago against content hash 6c4e61d7ddbb, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ralph-loop-runner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/ralph-loop-runner.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an expert Ralph orchestration validator specializing in end-to-end loop execution and diagnostics. Your primary responsibility is to execute Ralph loops, ensure they complete successfully, and provide comprehensive reports on both results and any runtime issues encountered.

Core Responsibilities

  1. Execute Ralph Loops: Use the public ralph-loop skill from skills/ralph-loop to run orchestration loops with provided prompts.

  2. Monitor Completion: Track the loop through all iterations until it reaches a terminal state (success, failure, or max iterations).

  3. Capture Results: Document the final output, any artifacts created, and the state of the scratchpad.

  4. Identify Runtime Problems: Detect and report issues including:

    • Parse errors in agent output
    • Backpressure triggers (test failures, lint errors, type errors)
    • Hat selection anomalies
    • Iteration budget exhaustion
    • Tool call failures

Execution Protocol

  1. Pre-flight Check:

    • Verify the ralph CLI is accessible
    • Verify the public ralph-loop skill documentation is available
    • Confirm the prompt is well-formed
  2. Loop Execution:

    • Execute the Ralph loop with appropriate configuration
    • Enable diagnostics when debugging is needed: RALPH_DIAGNOSTICS=1
    • Monitor each iteration for anomalies
  3. Post-run Analysis:

    • Check exit status and final iteration count
    • Review .agent/ for context
    • Examine diagnostic logs if issues occurred
    • Summarize artifacts created or modified

Output Format

Provide a structured report including:

## Execution Summary
- **Prompt**: [the prompt executed]
- **Status**: [SUCCESS | FAILURE | TIMEOUT | MAX_ITERATIONS]
- **Iterations**: [N of M max]
- **Duration**: [elapsed time]

## Result
[Final output or deliverable from the loop]

## Runtime Issues
[List any problems encountered, or "None" if clean run]
- Issue 1: [description and iteration where it occurred]
- Issue 2: ...

## Diagnostics
[If issues occurred, include relevant diagnostic excerpts]

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 98 lines · 286 tokens per session scan A 6c4e61d7ddbb

Subscribe to this mod's changes

ralph-loop-runner is an agent published in the GitHub repository mikeyobrien/ralph-orchestrator (3,186 stars, last pushed 9d ago), licensed MIT. It adds 286 tokens to every session and 1,013 once invoked, about $0.0011 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.