| name | autoloop |
| description | Run and operate autoloops — start runs, monitor progress, inject guidance, manage worktrees, inspect artifacts, and clean up. Use when the user asks to run an autoloop, check loop status, merge/clean worktrees, or operate on runs. |
Autoloop Operations
You are operating the autoloop CLI to manage autonomous coding loops. Parse $ARGUMENTS to determine the operation. If no arguments or ambiguous, ask what the user needs.
Operations
Start a Run
autoloop run <preset> "objective"
autoloop run <preset> "objective" --worktree
autoloop run <preset> "objective" --worktree --automerge
autoloop run --chain autocode,autoqa "objective" --worktree
Presets: autocode, autofix, autotest, autoqa, autoreview, autosimplify, autodoc, autosec, autoperf, autospec, autoresearch, autoideas, autopr, automerge
When to use --worktree: Always for code-modifying presets (autocode, autofix, autosimplify, autoperf). Optional for read-only presets (autoreview, autoideas, autosec).
When to use --automerge: When the user wants hands-off operation. Appends an automerge step that squash-merges on completion.
Backend override: Use -b claude or -b pi or -b kiro to switch backends.
Use run_in_background: true on the Bash tool when starting runs so the user isn't blocked.
Check Status
autoloop loops
autoloop loops --all
autoloop loops show <run-id>
autoloop loops watch <run-id>
autoloop loops health
autoloop loops health --verbose
When the user asks "how's it going" or "status" with no specifics, run autoloop loops first. If there's one active run, follow up with autoloop loops show <run-id>.
Inject Guidance
Send a message to a running loop. It appears once in the next iteration's prompt as ## OPERATOR GUIDANCE, then is consumed.
autoloop guide "Focus on error handling"
autoloop guide --run <run-id> "Skip the auth module, focus on payments"
Use this when the user wants to steer a running loop without killing it.
Inspect Artifacts
autoloop inspect scratchpad
autoloop inspect prompt <iteration> --format md
autoloop inspect output <iteration>
autoloop inspect coordination
autoloop inspect topology --format graph
autoloop inspect metrics --format terminal
autoloop inspect memory
Manage Worktrees
Worktrees provide git-level isolation. Each --worktree run gets its own branch (autoloop/<run-id>).
List Worktrees
autoloop worktree list
Shows: run ID, status, branch, base branch, merge strategy, created time. Orphaned worktrees (disk path missing) show (orphan).
Merge a Worktree
autoloop worktree merge <run-id>
autoloop worktree merge <run-id> --strategy squash
autoloop worktree merge <run-id> --strategy merge
autoloop worktree merge <run-id> --strategy rebase
If merge conflicts occur, the command aborts the merge, lists conflicting files, and exits non-zero. The user must resolve manually with git merge <branch> from the base branch.
Clean Up Worktrees
autoloop worktree clean
autoloop worktree clean --all
autoloop worktree clean --force <run-id>
What gets cleaned:
git worktree remove (or force-delete the directory)
git branch -d/-D to delete the branch
- Metadata directory removed
What's skipped by default: Running worktrees are skipped unless --all or --force is used.
Clean Up Run Directories
autoloop runs clean
autoloop runs clean --max-age 30
Worktree Lifecycle
- Created on
autoloop run --worktree: branch autoloop/<run-id>, dir .autoloop/worktrees/<run-id>/tree/
- Running: loop executes, commits land on worktree branch
- Completed: run finishes, worktree sits ready for merge
- Merged:
autoloop worktree merge <run-id> squashes into base branch
- Cleaned:
autoloop worktree clean removes directory, branch, and metadata
Routine maintenance pattern:
autoloop worktree clean
autoloop runs clean --max-age 14
Dashboard
autoloop dashboard
autoloop dashboard -p 3000 --host 0.0.0.0
Configuration
autoloop config show
autoloop config show --json
autoloop config path
Memory & Tasks
autoloop memory list
autoloop memory status
autoloop memory find "pattern"
autoloop memory add learning "insight"
autoloop memory remove <id>
autoloop task list
autoloop task add "description"
autoloop task complete <id>
Decision Guide
| User wants to... | Command |
|---|
| Implement a feature | autoloop run autocode "..." --worktree |
| Fix a bug | autoloop run autofix "..." --worktree |
| Write tests | autoloop run autotest "..." --worktree |
| Review code | autoloop run autoreview "..." |
| Security audit | autoloop run autosec "..." |
| Write docs | autoloop run autodoc "..." --worktree |
| Check what's running | autoloop loops |
| Steer a running loop | autoloop guide "..." |
| See what a loop did | autoloop inspect scratchpad |
| Merge finished work | autoloop worktree merge <id> |
| Clean up | autoloop worktree clean && autoloop runs clean |
| Full hands-off | autoloop run autocode "..." --worktree --automerge |