The project's README from github.com/ArvorCo/Relentless. As one markdown file: README.md.
The AI Agent Orchestrator That Never Stops
🆕 Smart Auto Mode: Save 50-75% on AI costs by routing tasks to the right model
Quick Start · Auto Mode · Why Relentless? · Supported Agents · Documentation
According to Matt Pocock, if you're trying to sneak Ralph into the enterprise, just pretend it's an acronym:
Relentless Agentic Looping Programming Helper
So naturally, RELENTLESS is the recursive acronym:
RALPH Endlessly Loops, Executing, Navigating Tasks, Learning, Evolving, Solving, Scaling
It's recursive. We loop. That's kind of our thing.
You have an AI coding agent. It's brilliant — for about 15 minutes. Then it loses context, forgets what it was doing, or hits a rate limit. You babysit it, re-prompt it, copy-paste context back in. Rinse and repeat.
What if it just... kept going?
Relentless runs your AI agent in a loop until all tasks are complete. Each iteration spawns a fresh agent with clean context. Memory persists through git commits and progress files. When one agent hits a rate limit, another takes over.
npm install -g @arvorco/relentless
cd your-project
relentless init
relentless run --feature my-feature --tui
That's it. Go grab a coffee. Or lunch. Or sleep. Relentless will keep working.
Geoffrey Huntley created the Ralph Wiggum Pattern — a brilliantly simple idea: run an AI coding agent in a loop until all tasks are done. Watch his original video to understand the concept.
The pattern works. But we found it could work better.
Ralph loops. Relentless loops smarter.
| Challenge | Ralph | Relentless |
|---|---|---|
| Specs | Manual PRDs, often vague | Structured specs inspired by GitHub SpecKit with interactive clarification and dependency ordering |
| Agents | Single agent (usually Claude) | Universal: Claude, Amp, OpenCode, Codex, Droid, Gemini — with automatic fallback on rate limits |
| Cost | Same model for everything | Route simple tasks to cheaper models, complex ones to capable models |
| Tasks | Can be too big or vague | 4-phase breakdown (Setup → Foundation → Stories → Polish) with 15-60 min task sizing |
| Quality | Hope it works | TDD enforced, E2E tests required, domain-specific checklists, cross-artifact analysis, constitution rules |
"Garbage in, garbage out — if your specs are vague, your agent will spin its wheels. And at $0.50 per iteration, those wheels get expensive fast."
Relentless ensures you know exactly what "done" means before the first line of code is written.
npm install -g @arvorco/relentless
# or
bun install -g @arvorco/relentless
cd your-project
relentless init
After upgrading Relentless, rerun /relentless.constitution to refresh relentless/prompt.md with the latest instructions (including spec/plan/tasks awareness).
If you have Relentless installed from before v0.4.0:
Update the package:
bun install -g @arvorco/relentless
# or: npm install -g @arvorco/relentless
Important: Re-run the constitution command to get updated templates:
/relentless.constitution
This will detect changes and offer upgrade options for your constitution.md and prompt.md files.
With Claude Code, Amp, or OpenCode (recommended):
# Create constitution + personalized prompt (do this once per project)
/relentless.constitution
# Create feature (tasks now auto-generates prd.json!)
/relentless.specify Add user authentication with OAuth2
/relentless.plan I'm using React, TypeScript, PostgreSQL
/relentless.tasks # Auto-converts to prd.json
/relentless.analyze # Validate consistency
With Codex, Droid, or Gemini (manual workflow):
relentless features create user-auth
# Then prompt your agent to create spec.md, plan.md, tasks.md
# Or reference .claude/skills/*/SKILL.md for format
relentless convert relentless/features/001-user-auth/tasks.md --feature 001-user-auth
# Auto mode is now the default (use --agent <harness> to opt out)
relentless run --feature 001-user-auth --tui
Watch the beautiful TUI as your agent works through each task, commits code, and marks stories complete.
relentless run --feature <name> [options]
Options:
--agent <harness>: Force a specific harness (auto, claude, amp, opencode, codex, droid, gemini).--mode <mode>: Auto mode cost tier (free, cheap, good, genius).--fallback-order <list>: Comma-separated harness order for auto fallback.--max-iterations <n>: Limit loop iterations (default: 20).--skip-review: Skip final review phase.--review-mode <mode>: Review quality tier (free, cheap, good, genius).--dry-run: Show routing and planning without executing agents.--tui: Run the interactive terminal UI.--dir <path>: Working directory for the run.relentless estimate --feature <name> [--mode <mode>] [--compare]
Options:
--mode <mode>: Cost tier for estimation (free, cheap, good, genius).--compare: Compare all modes side by side.relentless init
relentless convert <tasks.md> --feature <name>
relentless agents list
relentless agents doctor
Smart routing saves 50-75% on AI costs by matching task complexity to the right model.
Auto mode is now enabled by default and becomes the default agent. If you want to force a specific harness, pass --agent explicitly.
Auto Mode is designed to keep you productive: simple tasks run fast on cheaper models, while hard problems automatically route to stronger models (or escalate when needed). That means fewer reruns, lower spend, and faster end-to-end throughput on real features.
relentless run uses auto routing unless you pass --agent <harness>relentless/config.json defaults for defaultMode, fallback order, and model overrides--agent codex)| Mode | Model Selection | Best For |
|---|---|---|
| free | OpenCode free models | Maximum savings, simple tasks |
| cheap | Haiku 4.5, Gemini Flash, GPT-5.2 (reasoning-effort low) | Good balance, most tasks |
| good | Sonnet 4.5 (default) | Quality-focused development |
| genius | Opus 4.5, GPT-5.2 (reasoning-effort xhigh) | Complex architecture, critical tasks |
Notes:
Running a 10-story feature with mixed complexity:
| Mode | Estimated Cost | Savings |
|---|---|---|
| genius | $2.50 | — |
| good | $1.20 | 52% |
| cheap | $0.60 | 76% |
| free | $0.00 | 100% |
# Run with specific mode (auto routing)
relentless run --feature my-feature --mode cheap
# Force a specific harness (disables auto routing)
relentless run --feature my-feature --agent claude
# Override fallback order (auto mode only)
relentless run --feature my-feature --fallback-order opencode,droid,claude
# Skip final review (not recommended)
relentless run --feature my-feature --skip-review
# Custom review mode
relentless run --feature my-feature --review-mode genius
# Tune idle timeout (milliseconds) for stuck/quiet harnesses
RELENTLESS_EXECUTION_TIMEOUT_MS=120000 relentless run --feature my-feature
When a smaller model fails, Relentless automatically escalates:
haiku-4.5 → sonnet-4.5 → opus-4.5
glm-4.7 → haiku-4.5 → sonnet-4.5
gpt-5.2-low → gpt-5.2-medium → gpt-5.2-high → gpt-5.2-xhigh (maps to `--model gpt-5.2 -c reasoning_effort="low|medium|high|xhigh"` in Codex CLI)
The system tracks costs across all attempts and reports total spend.
{
"defaultAgent": "auto",
"autoMode": {
"enabled": true,
"defaultMode": "good",
"fallbackOrder": ["claude", "codex", "droid", "opencode", "amp", "gemini"],
"modeModels": {
"simple": "haiku-4.5",
"medium": "sonnet-4.5",
"complex": "opus-4.5",
"expert": "opus-4.5"
}
}
}
Notes:
defaultAgent: "auto" makes auto routing the default; set to claude, codex, etc. to opt out.autoMode.enabled only affects auto routing; it does not force auto unless defaultAgent is auto.Run Claude, Amp, OpenCode, Codex, Droid, or Gemini. Switch automatically when rate limits hit. Fall back gracefully. Recover when limits reset.
No more vague PRDs. Interactive /relentless.specify creates comprehensive specs with acceptance criteria, dependencies, and success metrics. Inspired by GitHub SpecKit.
TDD is not optional. E2E tests are not optional. Every story must pass typecheck. Constitution rules (MUST/SHOULD) are enforced. Checklists are loaded into agent prompts.
Why use GPT-5-Pro or Opus 4.5 to rename a variable? Four cost modes (free, cheap, good, genius) route tasks by complexity. Automatic escalation when smaller models fail. Save money. Ship faster.
Real-time progress bars, dynamic story grid that adapts to terminal size, priority badges, phase indicators, research markers. Auto mode now shows the current routing decision and idle time per story.
Stories can depend on other stories. Relentless validates, detects circular dependencies, and executes in the correct order.
/relentless.constitution now creates both constitution.md (project rules) AND prompt.md (personalized agent instructions) by analyzing your project structure.
| Agent | Skills | Commands | Status |
|---|---|---|---|
| Claude Code | .claude/skills/ |
/relentless.* |
✅ Full support |
| Amp | .amp/skills/ |
/relentless.* |
✅ Full support |
| OpenCode | .opencode/skill/ |
/relentless.* |
✅ Full support |
| Codex | .codex/skills/ |
Manual | ✅ Skills installed |
| Gemini | .gemini/GEMINI.md |
Manual | ✅ Instructions provided |
| Droid | Reference .claude/skills/ |
Manual | ✅ Works with prompting |
All agents get skills/instructions installed automatically via relentless init.
--print-logs by default to keep output flowing.--model gpt-5.2 -c reasoning_effort="low|medium|high|xhigh".--reasoning-effort and --auto autonomy levels; use --agent droid to force it.--prompt; set GEMINI_API_KEY (or Vertex/GCA flags) for auth.# Check what's installed
relentless agents list
# Health check
relentless agents doctor
After relentless init:
your-project/
├── relentless/
│ ├── config.json # Configuration
│ ├── constitution.md # Project rules (MUST/SHOULD)
│ ├── prompt.md # Personalized agent instructions
│ └── features/
│ └── 001-user-auth/
│ ├── spec.md # Feature specification
│ ├── plan.md # Technical plan
│ ├── tasks.md # User stories
│ ├── checklist.md # Quality checklist
│ ├── prd.json # Orchestration state
│ └── progress.txt # Learnings & context
├── .claude/
│ ├── skills/ # 11 skills for Claude/Amp/OpenCode
│ └── commands/ # /relentless.* command wrappers
├── .amp/skills/ # Copied for Amp
├── .opencode/skill/ # Copied for OpenCode (singular!)
├── .codex/skills/ # Copied for Codex
└── .gemini/GEMINI.md # Instructions for Gemini
Relentless uses a simplified 5-step SpecKit workflow:
| Step | Command | Output |
|---|---|---|
| 1. Specify | /relentless.specify |
spec.md |
| 2. Plan | /relentless.plan |
plan.md |
| 3. Tasks | /relentless.tasks |
tasks.md + prd.json (auto) |
| 4. Analyze | /relentless.analyze |
Validation report |
| 5. Implement | relentless run --tui |
Working code |
Optional: /relentless.checklist (between tasks and analyze)
Note: The
taskscommand now auto-runsconvert. Manualrelentless convertis only needed if you edit tasks.md by hand.
┌─────────────────────────────────────────────────────────────┐
│ │
│ /relentless.constitution → Project rules + prompt.md │
│ ↓ │
│ /relentless.specify → Structured spec │
│ ↓ │
│ /relentless.plan → Technical architecture │
│ ↓ │
│ /relentless.tasks → Stories + prd.json (auto) │
│ ↓ │
│ /relentless.analyze → Validate consistency │
│ ↓ │
│ relentless run --tui → Agent loops until complete │
│ ↓ │
│ ✅ Ship it │
│ │
└─────────────────────────────────────────────────────────────┘
relentless init # Initialize project; -f if upgrading to force overwrite
relentless run --feature <name> --tui # Run orchestration
relentless status --feature <name> # Show progress
relentless reset <story-id> --feature <name> # Re-run a story
# Auto Mode options
relentless run --feature <name> --mode <free|cheap|good|genius>
relentless run --feature <name> --fallback-order claude,opencode,amp
relentless run --feature <name> --skip-review
relentless run --feature <name> --review-mode <free|cheap|good|genius>
relentless features create <name> # Create feature
relentless features create <name> --auto-number # 001-name, 002-name...
relentless features list # List all features
relentless convert <file> --feature <name> # Convert to JSON
relentless analyze --feature <name> # Cross-artifact consistency
relentless issues --feature <name> # Generate GitHub issues
relentless issues --feature <name> --dry-run # Preview issues
relentless agents list # Show installed agents
relentless agents doctor # Health check
/relentless.constitution # Create project rules + prompt.md
/relentless.specify <desc> # Create feature spec
/relentless.plan [context] # Generate technical plan
/relentless.tasks # Generate user stories
/relentless.checklist # Generate quality checklist
/relentless.clarify # Resolve ambiguities
/relentless.analyze # Cross-artifact analysis
/relentless.implement # Execute implementation
/relentless.taskstoissues # Convert to GitHub issues
relentless/config.json:
{
"defaultAgent": "claude",
"agents": {
"claude": {
"model": "sonnet",
"dangerouslyAllowAll": true
}
},
"autoMode": {
"enabled": true,
"defaultMode": "good",
"fallbackOrder": ["claude", "codex", "droid", "opencode", "amp", "gemini"],
"modeModels": {
"simple": "haiku-4.5",
"medium": "sonnet-4.5",
"complex": "opus-4.5",
"expert": "opus-4.5"
},
"review": {
"promptUser": true,
"defaultMode": "good",
"microTasks": ["typecheck", "lint", "test", "security", "quality", "docs"],
"maxRetries": 3
},
"escalation": {
"enabled": true,
"maxAttempts": 3,
"escalationPath": {
"haiku-4.5": "sonnet-4.5",
"sonnet-4.5": "opus-4.5",
"gpt-5.2-low": "gpt-5.2-medium",
"gpt-5.2-medium": "gpt-5.2-high",
"gpt-5.2-high": "gpt-5.2-xhigh"
}
}
},
"fallback": {
"enabled": true,
"priority": ["claude", "amp", "opencode", "codex", "gemini"],
"autoRecovery": true
},
"execution": {
"maxIterations": 20,
"iterationDelay": 2000
},
"quality": {
"requireTypecheck": true,
"requireTests": true,
"enforceConstitution": true
}
}
| Setting | Description | Default |
|---|---|---|
autoMode.enabled |
Enable smart routing | true |
autoMode.defaultMode |
Default cost mode | "good" |
autoMode.fallbackOrder |
Harness priority order | ["claude", "codex", ...] |
autoMode.modeModels |
Model per complexity | See above |
autoMode.escalation.enabled |
Enable auto-escalation | true |
autoMode.escalation.maxAttempts |
Max escalation attempts | 3 |
autoMode.review.microTasks |
Review checks to run | ["typecheck", "lint", ...] |
passes: false and dependencies metpasses: trueprogress.txt<promise>COMPLETE</promise>Each iteration has access to: