ijfw-ralph-loop-runner

ijfw-ralph-loop-runner is an agent for coding agents from FerroxLabs/ijfw. It costs 31 tokens per session (1,014 once invoked), scanned A, original, MIT.

A recovery tool for background coding agents that have stopped after saving a progress checkpoint. It finds unfinished agents and starts them again with their saved context.

In plain words
What is it for?
Use it while several coding agents are working in parallel. It checks checkpoint files, identifies agents that appear stuck, and re-dispatches them from their last saved step.
Why use it?
It prevents work from being lost when an agent stops partway through a group of tasks. This reduces the need for the main agent to inspect files and restart work manually.

Agent

Part of the claude plugin — 18 commands, 37 agents, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/ferroxlabs/ijfw/ijfw-ralph-loop-runner
Clone the repo
git clone --depth 1 https://github.com/FerroxLabs/ijfw

Or install claude, the plugin that ships this one along with the rest of its 18 commands, 37 agents, 1 MCP server.

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 ijfw-ralph-loop-runner

README.md
[![agentmods](https://agentmods.dev/badge/agents/ferroxlabs/ijfw/ijfw-ralph-loop-runner.svg)](https://agentmods.dev/agents/ferroxlabs/ijfw/ijfw-ralph-loop-runner)
Your own site
<a href="https://agentmods.dev/agents/ferroxlabs/ijfw/ijfw-ralph-loop-runner"><img src="https://agentmods.dev/badge/agents/ferroxlabs/ijfw/ijfw-ralph-loop-runner.svg" alt="Measured on agentmods" height="20"></a>
Per session 31 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,014 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00031 $0.01014
Opus 5 $0.00015 $0.00507
Sonnet 5 $0.00006 $0.00203
Haiku 4.5 $0.00003 $0.00101

Measured 4d ago against content hash 696c19478ba3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ijfw-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 4d 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/ijfw-ralph-loop-runner.md · 94 lines

How it starts

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

Watch the wave-state checkpoint stream for orphaned subagents (last checkpoint present but no DONE status) and re-dispatch them with prior-checkpoint context so they pick up exactly where they truncated. Closes the v1.4.4 W10-A2 / A3 / B2 truncation-recovery gap that cost orchestrator context.

ROLE

Truncation recovery loop. In v1.4.4, 3 of 6 Wave 10 subagents truncated at 19-28 tool uses; the orchestrator detected silence and re-read worktree state manually. This agent makes that recovery deterministic and offloads it from the orchestrator's context window.

PROCESS

  1. Locate active wave -- read .ijfw/wave-<id>/STATE.md for the current phase. Accept explicit waveId input or auto-detect the most recently modified .ijfw/wave-*/ directory.

  2. Enumerate subagents -- list .ijfw/wave-<id>/subagent-*.checkpoint.json files. For each, read shape {tool_use_count, last_action, files_*, next_step, blockers?, timestamp}.

  3. Detect orphans -- invoke listOrphanedSubagents(waveId, projectRoot) from mcp-server/src/orchestrator/subagent-telemetry.js (provided by S1 prelude). An orphan = checkpoint exists, no DONE in last 90s, no new checkpoint in last 60s.

  4. For each orphan, write a resume-brief to .planning/<phase>/resume-<subId>.md:

    • Original task summary (read from blackboard claim).
    • Last checkpoint snapshot (verbatim JSON).
    • "Next step" pointer the subagent stated.
    • Explicit instruction: continue from next_step; do NOT redo completed files_created / files_modified work.
  5. Update RALPH-LOG.md -- append H3 entry per orphan with disposition:

    • RESUMED <subId>: brief written + suggested dispatch command logged.
    • STALE <subId>: no useful checkpoint; recommend fresh redispatch.
    • RESOLVED <subId>: DONE status posted since last poll; no action.
  6. Exit signal: emit gate-result.

    • Any RESUMED -> severity NOTE (recovery happened; informational).
    • All RESOLVED + no orphans -> PASS.
    • Any STALE -> MEDIUM (caller should consider scope-narrowing for re-dispatch).

Read the full file on GitHub · 94 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. 4d ago First seen · 94 lines · 31 tokens per session scan A 696c19478ba3

Subscribe to this mod's changes

ijfw-ralph-loop-runner is an agent published in the GitHub repository FerroxLabs/ijfw (210 stars, last pushed 11d ago), licensed MIT. It adds 31 tokens to every session and 1,014 once invoked, about $0.0002 per session on Opus 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.