Autonomous iterative loop for the GitHub Copilot CLI — a standalone TUI that re-feeds the same prompt to copilot -p ... until the agent declares completion or a hard cap fires.
autopilot is a standalone TUI app that drives the GitHub Copilot CLI through autonomous iteration loops. You arm it with a prompt — or pick one of three baked SDLC modes (--self-improve, --grow-project, --prompt) — and the driver re-spawns copilot -p ... every iteration until either the agent emits a configurable completion phrase, you call autopilot run --stop <runId>, or --max is hit.
Out-of-band control is first-class: --pause, --resume, --stop, and --status can all be invoked from a second terminal, write to the run’s state.json under a CAS-protected lockfile, and never kill an in-flight copilot -p subprocess mid-iteration. Plain mode is zero-dep — only Node ≥ 20 is required to drive a loop, tail events, list runs, or replay history. The Ink-rendered watch UI for autopilot watch and autopilot run adds Ink + React + Yoga + Commander; install it via cd packages/tui && npm install when you want the live TTY view.
!!! tip “Bare autopilot runs --self-improve --fresh”
Running the binary with no arguments is the same as autopilot run --self-improve --fresh. It starts a fresh self-improvement loop on the current repo against the baked prompt — no flags to remember on the happy path.
autopilot drives a coding agent through three levels of decomposition, then loops:
Orchestrate the tasks until every stage is delivered, then loop back to Level 1 for the next work item. Each iteration is a brand-new copilot -p subprocess, so context never poisons the next pass. The driver owns the spawn / capture / decide-to-stop trichotomy plus out-of-band control, structured event logs (events.jsonl), CAS-protected run state, completion / abort / stagnation triggers, and an adaptive iteration budget for --self-improve.