gastownhall/beads · error

running team wizard: %v

Error message

running team wizard: %v

What it means

In team mode, `bd init` runs the team setup wizard to configure a team workspace (remote provisioning, sync settings). If it fails with a non-cancellation error, bd closes the store and wraps it with this message; user cancellation is reported as errCanceled.

Source

Thrown at cmd/bd/init.go:1904

			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.")
				}
				_ = store.Close()
				if canceled {
					return errCanceled()
				}
				return fmt.Errorf("running team wizard: %v", err)
			}
		}

		// Safety net: ensure beads.role is always set when in a git repo (GH#2950).
		// Earlier code paths may skip role-setting when BEADS_DIR is set,
		// promptContributorMode fails, or edge-case flag combinations are used.
		// This guarantees every init leaves a usable role-configured state.
		if isGitRepo() {
			if _, hasRole := getBeadsRole(); !hasRole {
				fallbackRole := "maintainer"
				if roleFlag != "" {
					fallbackRole = roleFlag
				}
				if err := setBeadsRole(fallbackRole); err != nil && !quiet {
					fmt.Fprintf(os.Stderr, "Warning: failed to set beads.role=%s: %v\n", fallbackRole, err)
				}
			}
		}

View on GitHub (pinned to 71377f2769)

Solutions

  1. Re-run bd init in an interactive terminal
  2. Inspect the wrapped %v error and fix the failing step (network, auth, remote URL)
  3. Verify the shared server / remote is reachable before init (curl/ping the endpoint)
  4. Pre-configure sync settings manually and skip the wizard if automation is required

Example fix

// before (fails: server unreachable)
$ bd init --team
// after
$ dolt sql-server &   # ensure team server reachable
$ bd init --team
Defensive patterns

Strategy: try-catch

Validate before calling

[ -t 0 ] || echo "no TTY — team wizard needs an interactive terminal"
curl -sf "$TEAM_SERVER_URL" >/dev/null || echo "team server unreachable"

Try / catch

if ! bd init --team; then
  echo "team wizard failed — verify network/auth, then retry"
fi

Prevention

When it happens

Trigger: The team wizard is invoked during `bd init` and returns err with canceled == false.

Common situations: Non-interactive environment without a TTY, network failure reaching the team remote/shared Dolt server, missing authentication credentials, or the user skipping a required provisioning step that later fails.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/e4642f565309b1d6. Report an issue: GitHub.