Loop
Start an autonomous Ralph loop for the given change-id and task.
Claude CodeGeneric
# Start Ralph Loop
Start an autonomous Ralph loop for the given change-id and task.
**Arguments:** `<change-id> "<task description>" [--max N] [--done criteria]`
## Instructions
Start the Ralph loop and then monitor its progress until completion.
### Step 1: Start the loop
```bash
set-loop start $ARGUMENTS
Step 2: Monitor progress
After starting, run the monitor command to track progress until the loop completes:
set-loop monitor <change-id> --interval 30
This will output iteration updates and report the final status (done/stuck/stopped).
Options
--max N- Maximum iterations (default: 10)--done criteria- Done detection:tasks,openspec, ormanual(default: tasks, auto-detects openspec)--capacity-limit PCT- Stop if capacity exceeds threshold (default: 80%)--stall-threshold N- Stall after N commit-less iterations (default: 2)--iteration-timeout N- Per-iteration timeout in minutes (default: 45)--permission-mode MODE- Claude permission mode:auto-accept,allowedTools,plan(default: config)--label TEXT- Label for this loop instance (shown in banner and terminal title)--force- Force start even with incompatible permission mode (e.g. plan)
Examples
# Basic usage - implement feature per tasks.md
set-loop start add-auth "Implement authentication per spec"
# With options
set-loop start add-api "Build REST API endpoints" --max 15 --done tasks
# Manual done criteria (you mark it done)
set-loop start refactor "Refactor UserService" --done manual
What happens
- A new terminal window opens with the Ralph loop
- Claude Code runs iteratively on the task
- After each iteration, checks if tasks.md is complete
- Loop ends when done criteria met OR max iterations reached
- Notification sent when complete or stuck
- The monitor command reports progress back to you
Manual commands
set-loop status <change-id> # Check current status
set-loop list # List all active loops
set-loop stop <change-id> # Stop a running loop
set-loop history <change-id> # View iteration history
set-loop monitor <change-id> # Monitor until complete
Maintain Loop?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Loop on getagentictools](https://getagentictools.com/loops/tatargabor-start-ralph-loop?ref=badge)