gastownhall/beads · error
running contributor wizard: %v
Error message
running contributor wizard: %v
What it means
In contributor mode, `bd init` runs an interactive setup wizard (contributor wizard) that configures the repo for contributing (remotes, auth, role). If the wizard returns a non-cancellation error, bd closes the store and wraps it with this message; an explicit user cancellation is reported as errCanceled instead.
Source
Thrown at cmd/bd/init.go:1881
// Explicit --role flag overrides existing role
if err := setBeadsRole(role); err != nil && !quiet {
fmt.Fprintf(os.Stderr, "Warning: failed to set beads.role: %v\n", err)
}
}
}
// Run contributor wizard if --contributor flag is set or user chose contributor
if contributor {
if err := runContributorWizard(ctx, store); err != nil {
canceled := isCanceled(err)
if canceled {
fmt.Fprintln(os.Stderr, "Setup canceled.")
}
_ = store.Close()
if canceled {
return errCanceled()
}
return fmt.Errorf("running contributor wizard: %v", err)
}
// Contributor setup must also pin role detection to contributor.
// Without this, SSH remotes can be inferred as maintainer and bypass routing.
if isGitRepo() {
if err := setBeadsRole("contributor"); err != nil && !quiet {
fmt.Fprintf(os.Stderr, "Warning: failed to set beads.role=contributor: %v\n", err)
}
}
}
// Run team wizard if --team flag is set
if team {
if err := runTeamWizard(ctx, store); err != nil {
canceled := isCanceled(err)
if canceled {
fmt.Fprintln(os.Stderr, "Setup canceled.")
}View on GitHub (pinned to 71377f2769)
Solutions
- Re-run bd init in an interactive terminal with a TTY
- Check the wrapped %v error — fix the specific setup step (e.g. add a git remote, set up SSH)
- If run non-interactively, skip wizard mode or pre-configure the remote/role manually
- Press the proper cancel key if you intended to abort (yields errCanceled, not this error)
Example fix
// before (fails in CI, no TTY) $ ci-runner exec bd init --contributor // after $ bd init --contributor # run locally in an interactive shell # or pre-set: bd config set beads.role contributor
Defensive patterns
Strategy: try-catch
Validate before calling
[ -t 0 ] && [ -t 1 ] || echo "no TTY — contributor wizard will fail; run interactively" git remote -v | grep -q origin || echo "no git remote configured"
Try / catch
if ! bd init --contributor; then case $? in 0) ;; *) echo "wizard failed — run interactively or configure remote/role manually";; esac fi
Prevention
- Run init in an interactive terminal with a TTY
- Configure git remote and SSH keys before the wizard
- Pre-set beads.role when automating (bd config set beads.role contributor)
- Distinguish cancellation (intentional) from real wizard failures in scripts
When it happens
Trigger: promptContributorMode leads to running the contributor wizard; the wizard function returns err where canceled == false during `bd init`.
Common situations: Non-interactive terminal (no TTY) when bd init is run in CI or piped, user aborts an auth step, git remote missing or unreachable while the wizard probes it, or SSH keys not set up so setup steps fail.
Related errors
- running team wizard: %v
- --contributor requires interactive prompts and cannot be use
- --team requires interactive prompts and cannot be used with
- failed to get current branch: %w
- database is not initialized. Run 'bd init' first
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/b6a7008e976c71c7.
Report an issue: GitHub.