Autopilot
Autopilot is Koda's hands-off mode. You describe a goal and how to know it's done; a lead agent plans the work on the board, builds it tests-first, runs your verify command, and keeps going until it passes. Turn on parallel workers and the goal is split into independent cards, each built in its own isolated git worktree and merged back when its tests are green.
Overview
Normally you drive an agent turn by turn. With Autopilot you hand off the whole outcome and let Koda keep the work moving:
- Plan — the lead agent breaks the goal into cards on the board.
- Build — it writes code tests-first, committing each green milestone.
- Verify — Koda runs your verify command and only accepts a real pass.
- Loop — whenever the agent goes idle, Koda nudges it with
continueso it keeps going until the goal is met (or it needs you).
A persistent status banner stays in view the whole time, showing the current state — Building, Verifying tests…, Verification failed — fixing, Needs your input, Goal complete ✓ — along with how many cards are done, how many workers are running, the number of auto-continues, and elapsed time against your budget. You can Stop at any moment.
Starting a run
Open the Autopilot dialog two ways:
- The ⟳ Autopilot button in the header (shown whenever a workspace is open).
- The command palette (
Ctrl/Cmd+K) → Start Autopilot….
In the dialog you set:
| Field | What it's for |
|---|---|
| Goal (required) | What you want built, in plain language. |
| Done when | The acceptance criteria — how the agent (and you) know the goal is met. |
| Verify command | A shell command that must exit 0 for the run to be considered complete, e.g. npm test && npm run build. Optional but strongly recommended — it's the gate (see below). |
| Agent & account | Which installed CLI drives the run, and for Claude, which account. |
| Time budget | 30m / 1h / 2h / 4h (default 2h). When active build time exceeds it, the run pauses rather than burning on forever. |
You can also start from a template — Python CLI, Node/TS API, Web app, Add tests, or Fix a bug — which pre-fills a sensible goal, acceptance criteria, and verify command you can edit. Hit Start building and the run begins in a fresh pane.
Solo vs. parallel workers
The Parallel workers toggle (experimental) decides how the work gets done.
Solo
One lead agent does everything: it plans cards, writes the code, runs the tests, commits, and signals completion itself. Simple, sequential, and works in any folder.
Parallel workers
The lead becomes a planner and integrator only — it is explicitly instructed not to write code. Instead it decomposes the goal into independent, lane-partitioned cards (each owning a non-overlapping slice of the codebase). Koda then runs a separate worker for each Backlog card:
- Each worker builds in its own isolated git worktree under
.koda/wt/<slug>/— a separate branch — so workers never edit the same files at the same time. - A worker claims its card, builds tests-first, commits on its branch, marks the card done, and stops.
- Koda merges the worktree back automatically when the card's tests pass, then removes it. A merge conflict is surfaced once so the lead can file a fix-up card.
- Up to a few workers run at once; new ones are dispatched as cards appear. A worker whose CLI never boots is reaped and re-dispatched a couple of times before giving up.
The verify gate
The single most important idea in Autopilot: the agent doesn't get to declare victory on its own.
When the lead believes it's finished, it signals completion with a summary and a verify command. Koda then independently runs that command and reads the real exit code:
- Exit 0 → the goal is accepted. State becomes Goal complete ✓.
- Non-zero → state becomes Verification failed — fixing. Koda pastes the failure output back into the pane and the loop continues so the agent can fix it.
Supervised vs. auto
The Auto-accept permissions toggle controls how the underlying CLI handles approval prompts. Your choice is remembered for next time.
- Auto (default) — panes launch with permissions bypassed so the loop never stalls waiting on an approval dialog. Best for trusted projects where you want true hands-off building.
- Supervised — the agent asks before each action and you approve it in the pane, exactly as in a normal session. Slower, but you see every step.
When it needs you
Autopilot is autonomous, not reckless. When it hits a decision only you can make — a missing secret, an ambiguous product call — the lead pauses the run and asks. The banner switches to Needs your input and shows the question.
Answer right in the banner's input box, or just type your reply directly in the pane — either way the run resumes. Time spent paused doesn't count against your time budget. If the agent CLI never actually started (so the injected continue nudges are echoing shell errors), Autopilot detects it and stops with a clear reason rather than spinning.
Where state lives
Everything Autopilot needs to run — and to survive a reload — is kept in your workspace under .koda/:
| Path | Holds |
|---|---|
.koda/coord/autopilot-run.json | The live run context — goal, criteria, verify command, budget, mode, agent/account, start time. Written on start, removed on stop. Lets a run rehydrate after a renderer reload, and lets the lead recover its goal if its prompt was truncated. |
.koda/coord/autopilot-done.json | The completion signal the lead writes when it believes the goal is met (then verified by the gate). |
.koda/coord/autopilot-blocked.json | The question behind a Needs your input pause. |
.koda/board.json | The cards the lead planned — the same Kanban board you see in the Tasks tab. |
.koda/wt/<slug>/ | Each parallel worker's isolated git worktree (created and removed automatically). |
Because the run context is persisted, closing and reopening Koda — or an in-app reload — won't lose an Autopilot run in progress; it picks back up where it was.
