Small Go CLI for kicking off the next ready Beads task through OpenCode or Claude Code and /rp1-build.
- runs
bd ready --jsonin a target repo - selects the next best ready issue
- optionally claims it
- builds an
/rp1-build "requirement" "description" --afkprompt - launches OpenCode in the target repo with
opencoderand an Opus-class model - can fall back to Claude Code with
--launcher claude - loop mode: continuously processes all ready issues, closing each on success
GOPRIVATE=github.com/flipch/* go install github.com/flipch/autopilot/cmd/autopilot@latestFor published binaries from this private repo, use the authenticated installer:
gh repo clone flipch/autopilot && ./autopilot/scripts/install.shTo pin a version:
AUTOPILOT_VERSION=v0.1.1 ./autopilot/scripts/install.shgo run ./cmd/autopilot next --repo /Users/felipeh/Development/jobber# Preview without claiming or launching
go run ./cmd/autopilot next --repo /Users/felipeh/Development/jobber --dry-run
# Pick from ready items interactively
go run ./cmd/autopilot next --repo /Users/felipeh/Development/jobber --pick
# Use a specific issue
go run ./cmd/autopilot next --repo /Users/felipeh/Development/jobber --issue jobber-t6m.7
# Skip claim
go run ./cmd/autopilot next --repo /Users/felipeh/Development/jobber --no-claim
# Launch with Claude Code instead of OpenCode
go run ./cmd/autopilot next --repo /Users/felipeh/Development/jobber --launcher claude
# Print just the generated /rp1-build prompt
go run ./cmd/autopilot next --repo /Users/felipeh/Development/jobber --print-promptProcess all ready issues sequentially, closing each on success:
# Loop through all ready issues with Claude
autopilot loop --repo /Users/felipeh/Development/jobber --launcher claude
# Limit to 5 tasks with a 30s cooldown between each
autopilot loop --repo /Users/felipeh/Development/jobber --max-tasks 5 --cooldown 30s
# Use OpenCode (default launcher)
autopilot loop --repo /Users/felipeh/Development/jobberThe loop:
- Picks the highest-priority ready issue
- Claims it
- Launches the agent
- On exit 0: closes the issue via
bd close - On non-zero exit: logs the failure, continues to next issue
- Repeats until no ready issues remain (or
--max-tasksreached) - Handles SIGINT/SIGTERM gracefully
Add --review to enable the full PR lifecycle. Autopilot orchestrates everything — agents are only invoked for AI-heavy work (review analysis and code fixes):
autopilot loop --repo ~/Development/jobber --launcher claude --review
autopilot loop --repo ~/Development/jobber --review --max-review-rounds 5With --review enabled, the loop becomes:
- Build agent runs with
--git-pr --afk→ creates PR - Autopilot detects the PR via
gh pr list --head <branch> - Autopilot launches a review agent with
/pr-review <pr-number> - Autopilot parses the verdict from
.rp1/work/pr-reviews/ - If approved → autopilot merges via
gh pr merge --squash→ closes beads issue - If changes requested → autopilot launches fix agent with
/address-pr-feedback <pr> --afk→ pushes fixes → re-reviews - If blocked or max rounds reached → logs failure, moves to next issue
Requires gh CLI authenticated and in PATH.
By default (--parallel 0), autopilot counts ready issues and spawns that many workers (capped at 5):
# Auto-detect: spawns min(ready_issues, 5) workers
autopilot loop --repo ~/Development/jobber --launcher claude --log-file /tmp/autopilot.log
# Exactly 3 workers
autopilot loop --repo ~/Development/jobber --launcher claude --parallel 3
# Single worker (sequential, agent gets terminal I/O)
autopilot loop --repo ~/Development/jobber --launcher claude --parallel 1Each worker independently picks issues, claims them (atomic via bd --claim), and processes them. If two workers race for the same issue, the loser retries with the next one. Worker logs are prefixed [w1], [w2], etc.
With multiple workers, agent stdout/stderr is discarded — use --log-file to monitor progress.
Add --zellij to get each worker in its own visible, interactive pane:
# Auto-detect workers, each in a zellij pane
autopilot loop --repo ~/Development/jobber --launcher claude --zellij
# 3 workers in zellij with review enabled
autopilot loop --repo ~/Development/jobber --launcher claude --zellij --parallel 3 --reviewIf you're already in a zellij session, panes are added to it. Otherwise, a new autopilot-<repo> session is created. Each pane runs a single-worker loop with full terminal I/O — you can switch panes to watch any agent, or type into a session to intervene.
By default, loop logs go to stderr (mixed with agent output). Use --log-file for clean, dedicated logs:
autopilot loop --repo ~/Development/jobber --launcher claude --log-file /tmp/autopilot.log
# Monitor from another terminal:
tail -f /tmp/autopilot.logLogs are written to both stderr and the file, with timestamps and structured messages for each step (claim, launch, review, merge, close).
- launcher:
opencode - model:
anthropic/claude-opus-4-6 - agent:
opencoder
For Claude launcher, the default model becomes opus.
Autopilot optionally reads:
~/.config/autopilot/config.jsonExample:
{
"repo": "/Users/felipeh/Development/jobber",
"launcher": "claude",
"model": "opus",
"effort": "max",
"no_claim": false,
"roles": {
"builder": { "model": "opus", "effort": "max" },
"reviewer": { "model": "sonnet", "effort": "high" },
"fixer": { "model": "sonnet", "effort": "high" }
}
}The roles section lets you use different models/effort levels for each step of the review cycle. Builder does the heavy implementation work, reviewer analyzes the PR, fixer addresses feedback. Omit any role to use the top-level defaults.
CLI flags override config values.
autopilot versionbdinPATHopencodeorclaudeinPATH, depending on launcher- target repo must be a git repo with Beads configured
Push annotated tags matching v*.*.* to trigger the GitHub Actions release workflow. The workflow runs go test ./... and publishes cross-platform binaries through Goreleaser using goreleaser.yaml.