ralphctl (opens in a new tab) is the agent harness I build and use daily. It wraps an AI coding CLI in structure: one model generates the code, a second model checks it against the spec, and the state lives in files rather than in a context window.
These six articles are the build log, in order, from v0.0.4 to v0.29.0. Read them start to finish for the arc, or jump to whichever release solved the problem you have. For the concepts underneath, without the version numbers, start with the field guide.
In this guide, in reading order

Building RalphCTL: a sprint CLI for AI-assisted coding
Part 1 of 6 in Building ralphctl
AI engineering

From sprint CLI to agent harness: how ralphctl got an evaluator
Part 2 of 6 in Building ralphctl
AI engineering

The harness era caught up: ralphctl and the convergence I bet on
Part 3 of 6 in Building ralphctl
AI engineering

Earning the overnight run: ralphctl from 0.8 to 0.13
Part 4 of 6 in Building ralphctl
AI engineering

What ralphctl found when it finally measured itself
Part 5 of 6 in Building ralphctl
AI engineering

Seven agentic patterns from eight ralphctl releases
Part 6 of 6 in Building ralphctl
AI engineering
Run the code
The code behind every article in this guide.
lukas-grigis/ralphctl on GitHub (opens in a new tab)
Install
npm install -g ralphctlNeeds Node.js 24 or newer.
Try it in a sandbox, no setup needed
ralphctl demo
Key ideas
- ralphctl is terminal-only and file-backed: state lives as JSON under
~/.ralphctl/, no server and no database. Two-phase planning splits requirements (the refine flow) from dependency-ordered tasks (the plan flow), both launched from the TUI. - A per-repo
verifyScript, typicallypnpm typecheck && pnpm lint && pnpm test, runs before and after every task and gates completion. I added it after shipping broken code twice. - v0.2.0 added the evaluator, and by v0.2.3 it graded each task against explicit
verificationCriteriaon correctness, completeness, safety and consistency; robustness made it five floors in v0.15.0. The retry loop is bounded and non-blocking. - From v0.8.4 the loop crossed labs by default: Claude Opus 4.8 generated, OpenAI Codex on GPT-5.5 evaluated, so a rival lab graded the work. In v0.29.0 the default pair is Claude Opus 5.5 and OpenAI's GPT-6.2 Sol. Parity across providers is real, and keeping it that way is constant work.
- The overnight-trust work was unglamorous: parallel tasks in isolated git worktrees and an NDJSON learning ledger (v0.9.0), cost-tiered presets that climb one rung per stall, and a consent-gated crash-safe migration (v0.13.0).
- v0.20.0 gave the harness a report on itself. The first run said 84.3% first-pass and zero failed acceptance criteria, off 274 of 400 criteria that were never graded at all.
- Design decisions cite their evidence in the source. At v0.29.0 that is eleven arXiv papers at 21 sites across 16 files, plus a research-references file in the repo; at the end of August it was thirteen papers at 42 sites, including the comments that say where the code departs from the paper.
Frequently asked questions
- What is ralphctl?
- ralphctl is an open-source agent harness for long-running AI coding tasks. It takes a ticket, refines it into structured requirements with AI, plans dependency-ordered tasks, executes them through a coding CLI, and gates each one on a check script plus a second model's review. State lives as files under ~/.ralphctl/, so there is no server and no database. It is on npm under the MIT license.
- Which AI coding providers does ralphctl support?
- Five backends: Claude Code, OpenAI Codex CLI, GitHub Copilot CLI, OpenCode and Grok Build CLI, selectable per flow, so a different backend can sit on refine, on plan, and on each side of the implement loop. OpenCode is the vendor-neutral one: it fronts other providers and local runtimes on your own keys, or runs on its free tier with none. OpenCode joined in v0.19.0, Grok in v0.22.0.
- How does ralphctl decide that a task is done?
- Two gates in sequence. First a per-repo check script has to pass, for example pnpm typecheck && pnpm lint && pnpm test. Then an evaluator model grades the change against the task's explicit verificationCriteria across five floor dimensions, correctness, completeness, safety, consistency and robustness, and the overall result fails if any single dimension fails. A failure resumes the generator with the critique, within a bounded per-attempt turn budget.
- Can you leave ralphctl running unattended?
- That is what the v0.8.4 to v0.13.1 releases were for. Tasks can run in parallel in isolated git worktrees that fold back onto one sprint branch, a per-project learning ledger carries what one sprint discovered into the next, the economic and strong-gate presets start on a cheap model and climb one rung per stall, and an upgrade runs a consent-gated, crash-safe migration instead of asking you to start fresh. Since v0.25.0 a run that dies mid-task shows up as interrupted and can be resumed.
Updates
Brought up to ralphctl 0.29.0: part 6 of the build log added, the cross-lab default named as it ships today, the citation census re-taken at v0.29.0, and the unattended-run answer corrected. Since v0.27.0 the migration no longer promises a full backup, so the guide no longer does either.