Skip to Content
DocsGuidesAutopilot Mode

Autopilot mode runs an agent in a loop — implement, validate, retry — until all checks pass or the iteration budget runs out. A fresh agent session is spawned each iteration to avoid context rot.

When to use

  • The scope is well-defined with clear acceptance criteria
  • The feature spec has a ## Validation section with executable checks
  • You want hands-off execution

Modes

ModeAgentsCommand
AutopilotSingle agentfeature-do 07 --autonomous
SwarmMultiple agentsfeature-start 07 cc gg --autonomous --auto-submit

Swarm is Fleet + Autopilot — multiple agents compete, each running autonomously.

How it works

Iteration 1: spawn agent → implement → run validation ↓ fail Iteration 2: spawn fresh agent → read previous attempt → fix → validate ↓ fail Iteration 3: spawn fresh agent → read attempts 1-2 → fix → validate ↓ pass ✓ Done — agent signals submitted

Each iteration gets a fresh context window but can see the history of previous attempts.

Workflow

Single agent (Autopilot)

# Create and set up the feature first /aigon:feature-create fix-pagination # → Describe the bug: pagination shows wrong page count after filtering... /aigon:feature-prioritise fix-pagination /aigon:feature-start 42 # Run autonomously (max 5 iterations by default) aigon feature-do 42 --autonomous # Or with options aigon feature-do 42 --autonomous --max-iterations=3 --agent=cx

Multiple agents (Swarm)

# Set up Fleet with autonomous mode aigon feature-start 42 cc gg cx --autonomous --auto-submit # Or use the autopilot command for full orchestration aigon feature-autopilot 42 cc gg cx

The feature-autopilot command handles setup, spawning, monitoring, and evaluation in one step.

Writing validation checks

Add a ## Validation section to your feature spec:

## Validation \`\`\`bash cd site && npm run build && echo "Build OK" npm test \`\`\`

Each command must exit 0 for validation to pass. The agent runs these after each implementation attempt.

Flags

FlagDefaultDescription
--autonomousoffEnable autonomous retry loop
--max-iterations=N5Maximum retry attempts
--auto-submitoffAuto-signal submitted on success (for Swarm)
--agent=<id>ccWhich agent to use
--dry-runoffShow what would run without executing
Last updated on