Autonomous iterative loop for GitHub Copilot CLI and Claude Code, packaged as the
autopilotstandalone TUI app.
Above:
autopilot watch <runId>tailing a--self-improverun on iter 1/10 — IDEATE/CRITIQUE/BASELINE stages green, IMPLEMENT in flight on open issue #105, with sub-task ticks, recent tool calls (grep/view), and the per-iter timeline rendered side-by-side.
autopilot drives a coding agent through three levels of decomposition, then loops:
- Level 1 — find what to do. Scan the repo (red CI, stale PRs, open issues, SDLC hardening rotation) and pick one concrete work item. If nothing is queued, ideate a new feature and file it as a GitHub issue first, then pick it up.
- Level 2 — split into stages. Plan the SDLC stages this work item needs — generated per work item, not a fixed pipeline. Typical shape: orient → critique → baseline → implement → test → commit → push, but a doc fix may skip several and a feature may add more (acceptance, demo, close).
- Level 3 — split into tasks. Break each stage into the smallest executable steps the agent can deliver in one turn.
Orchestrate the tasks until every stage is delivered, then loop back to Level 1 for the next work item. The driver runs unattended until the agent emits COMPLETE / ABORT_NO_IMPROVEMENTS or hits the iteration cap.
git clone https://github.com/kloba/autopilot
cd autopilot/packages/tui && npm install && npm link
autopilot --help# Bare invocation — self-improve loop, fresh context per work item.
autopilot
# Drive each iter with Claude Code instead of Copilot.
autopilot claude
# Grow a backlog of GitHub issues with a focus area.
autopilot run --grow-project --focus "autopilot replay UX"
# Custom prompt — re-fed verbatim every iter until COMPLETE.
autopilot run --prompt "Refactor packages/tui/src/runner.mjs and add tests. Emit COMPLETE when green."See docs/quickstart.md for the full first-run walkthrough.
Long-haul autonomous loops can be slow and costly: this captured
copilot --resumesession ran for 9h 48m 20s, consumed 2,640 premium requests, and streamed hundreds of millions of cached tokens. Start with small--max/--mincaps and watch usage before leaving a run unattended.
The live site is at https://kloba.github.io/autopilot/ and built from docs/:
quickstart.md— first run in under a minute.concepts.md— run lifecycle, JSONL event model, pause/resume, adaptive budget.configuration.md— subcommands, flags, env vars, commit attribution, caffeinate, requirements, limitations.recipes.md— task-shaped how-tos (self-improve, grow-project, custom prompt).cli-stack.md— howautopilotsits on top of Copilot / Claude Code.ARCHITECTURE.md— out-of-session driver, baked-prompt pattern, JSONL contract.faq.md— recurring questions.CONTRIBUTING.md— local dev setup, style, PR expectations.
SECURITY.md covers vulnerability reporting. CHANGELOG.md is the per-release behavior log.
MIT

