Spec-driven queue
Prioritized markdown specs with explicit exclusions keep the agent from wandering.
Define a queue of verifiable tasks before you leave work. owloop runs them overnight in isolated git worktrees, verifies each one with the shell commands you wrote, and commits only on green.
uvx owloop init && owloop run
How it works
Start with a vague goal. owloop spec reads your codebase, asks clarifying questions, and drafts a concrete spec.
Edit the generated spec: requirements, shell-verifiable acceptance criteria, exclusions, and stuck behavior.
owloop run opens a full-screen TUI with an animated owl, iteration counter, token budget, and real-time status.
The agent runs the exact shell commands from your acceptance criteria. Only green means commit.
Open the worktree diff and the HTML report. Merge when ready. Go back to sleep.
A night with owloop
Type a vague goal in plain English. The agent studies the codebase, asks 1–3 clarifying questions, and drafts a spec.
owloop spec "refactor error handling"
Edit the generated spec if needed, then queue it. Add more specs for the backlog.
owloop run --max-tokens 200000 --max-duration 480
The full-screen TUI shows Ollie working: current spec, iteration count, token usage, and what the agent is doing — not raw command scrollback.
Green acceptance criteria → commit + push. Failure → retry with exponential backoff. Same files flapping → fix-loop warning.
Open the HTML report, inspect the worktree diff, run your own sanity checks, then merge. Your main branch stayed clean all night.
Quality you can verify
The spec defines the exact commands that must pass. The agent does not decide for itself whether it is done.
Everything happens in a disposable git worktree. Your main checkout is never touched until you choose to merge.
If the same files keep changing without the spec closing, the loop warns instead of burning tokens forever.
--max-tokens and --max-duration stop the run before costs spiral. Cross-iteration notes prevent the agent from repeating the same mistake.
Why owloop
Prioritized markdown specs with explicit exclusions keep the agent from wandering.
Each task starts clean. No accumulated context drift, no accidental side effects.
Main checkout stays untouched until you review and merge the worktree branch.
Completion is a grep-able <promise>DONE</promise>, not a model guess.
Catches death spirals when the same files are edited repeatedly without progress.
Set --max-tokens and --max-duration. The loop stops before your wallet does.
Compared to
| owloop | /goal |
gnhf | |
|---|---|---|---|
| Completion check | grep <promise> |
Haiku judgment | grep |
| Best for | Backlog of verifiable tasks | One focused task, user present | Multi-agent overnight |
| Spec format | Constraint-oriented | Free-form | Free-form |
| Context | Fresh per iteration | Same session | Fresh per iteration |
| Isolation | Worktree | None | None |
Install owloop, write your first spec, and let Ollie handle the rest.