Agent Loop is a small Bash recipe by Ben Tossell that drives an autonomous agent over a repo's open GitHub issues. loop.sh runs the agent (Factory's `droid exec -f prompt.md`) for up to N iterations; prompt.md has the agent fetch open issues with `gh issue list`, do the smallest unit of work for one issue, verify before committing, push a feature branch, and open a PR. The loop exits early when the agent emits `<done>COMPLETE</done>` (all issues handled) or `<done>NO_TASKS</done>` (no open issues). It is explicitly inspired by Matt Pocock's Ralph loop and ships a companion Next.js UI viewer (bentossell/ralph-loop-ui) that reads the issues and shows live loop status.
Loop
- Goal
- Every open GitHub issue in the repo has been resolved by an autonomous agent that opened a pull request for it.
- Exit when
- `gh issue list --state open` returns no open issues (the agent emits `<done>NO_TASKS</done>` / `<done>COMPLETE</done>`).
Check between iterations