Skip to content

v1.62.0 ·

The autopilot that never waited for a person

The problem

Nothing in autopilot waits for a person. aidlc autopilot setup asks about the agent, parallelism, cost cap and release step. The agent is told to run "through every phase up to the release boundary", the unattended rule's phase-end-turn says to keep going, and the driver merges each pull request as soon as CI is green and runs the release step. An agent that stops early is parked as a failure. On this repository every item is merged and published with no review at any point.

How it could be solved

The hardest decision gave up part of what was asked for. The request was for the stops to be on by default. For anyone already running autopilot without them, that would make the next run halt at a review nobody had mentioned, with no one watching to notice. A one-time notice was weighed and dropped: it needs its own record of having been shown, and the first run stalls anyway. So a saved setup that names no stops keeps working exactly as before, and the stops arrive as the recommended answers the next time someone answers the setup questions. The price is plain. Until someone does, a project keeps merging and releasing with no review, which is the complaint this work began with. The change did not choose the stops for AIDLC's own repository either; that was left to its owner.

Another was when an item learns its stops. Reading the settings afresh on every pass would be simpler, but an item can outlive the run that started it. One started with no pauses, or one already building when the upgrade landed, would suddenly wait on a phase it finished hours earlier. So the stops are fixed when an item starts, and a run's own override reaches only the items that run starts. The cost is that changing the saved setup does nothing to work already under way.

The last two were about what waiting means. Only items told to stop at the pull request are closed out after a person merges them. If someone merges an item autopilot meant to merge itself, it is still just dropped, because that is how a person takes over a run that has gone wrong, and autopilot should not then act on work they have taken back. And a waiting item gives up its build slot, so two items waiting for review cannot hold up everything behind them. What that gives up is a limit on clutter: the separate copies of the code that waiting items sit in can pile up, bounded only by how many items a run is allowed to start.

How AIDLC solves it

Autopilot stops where a person says, and those stops are the defaults for anyone who answers the setup questions after this release.

  • Pause after chosen phases. The agent is told the phases through AIDLC_PAUSE_AFTER and stops at a review boundary — a new outcome in the unattended rule: commit, release the claim, end the session. The item waits as awaiting-review, which is not parked, and aidlc autopilot approve <instance> carries it on. Autopilot judges this from the worktree's phase files, not from the agent's word, so an agent that ignores the variable still cannot reach a pull request.
  • Stop at the pull request. stop_at: pr opens the pull request, watches CI, and waits in awaiting-merge. A person's merge is the approval: autopilot then closes the instance out on main — pull, mark the deployment record complete, aidlc transition, commit, push — and runs no release. Previously a hand-merged pull request was dropped and the instance never closed. A pull request closed without merging is dropped.
  • stop_at: merge merges when CI is green and skips the release step whatever is configured.
  • Set three ways, in this order. Team keys stop_at and pause_after in .aidlc/config.yaml, overridden by the machine's config.json, overridden by aidlc autopilot run --stop-at / --pause-after for the items that run starts. Each item records the stops in force when it started and is held to them until it finishes.
  • Two new questions in aidlc autopilot setup and aidlc init (six now, not four), after the cost cap and before the release step, recommending pauses after requirements and design and a stop at the pull request.
  • A waiting item holds no build slot, so the run keeps starting others, and it keeps its run alive so there is something to carry it on.

Nothing changes for anyone who upgrades and does not answer the questions. A config with no stop_at and no pause_after behaves exactly as 1.61.0 does: no pauses, merge and release. Each aidlc autopilot run now prints a stops: line, and when neither key is set it says in so many words that every item will be merged and released with no review, and names aidlc autopilot setup. An item already tracked when the upgrade lands has no recorded stops and keeps today's behaviour too.

Minor, not patch: a new subcommand (autopilot approve), four new flags, two new config keys, three new item steps, and a fourth outcome in the unattended rule. Minor, not major: every default is the old behaviour until somebody chooses otherwise.

Changes

Nine commits, 42 files, +2,538 / −146.

  • packages/cli/src/autopilot/stops.ts (new) — the allowlists, parsers, stopsInForce, stopsLine, pendingReview, pauseEnv.
  • packages/cli/src/autopilot/driver.ts — awaitIfPaused, advanceApproved, openPullRequest, answeredByPerson, closeOut, closeSteps (shared with serveQueue), advanceAwaitingMerge, approveItem, itemStops, AIDLC_PAUSE_AFTER in the agent env, waitingFor in status.
  • packages/cli/src/autopilot/state.ts, team.ts, run.ts, presets.ts, questions.ts — the config and item fields, three steps, the team keys, withRunStops, the two choice lists, the two questions and where their answers go.
  • packages/cli/src/commands/autopilot.ts — approve, --stop-at / --pause-after on run and setup, the stops line, both in describeConfig.
  • packages/cli/src/commands/init.ts, src/setup/work-mode.ts — help text and comments.
  • packages/content/resources/rules/unattended.md — the review boundary.
  • packages/content/skills/84-autopilot.md and its generated copies, docs/roadmap.md, packages/website/src/data/cli-reference.json.
  • .aidlc/knowledge/decisions/ — autopilot-stops-recorded-on-item, autopilot-pauses-enforced-from-phase-files.
  • Tests: autopilot-stops.test.ts (new, 11); new describes in autopilot-driver.test.ts, autopilot-run.test.ts, autopilot-team.test.ts, autopilot-skills.test.ts, unattended-rule.test.ts; the rule budget in overview-rules.test.ts; adapted for six questions: autopilot-questions.test.ts, init-work-mode.test.ts, init-work-mode-wiring.test.ts.