{"record":{"id":"24a57ca6354d1825","repo":"gastownhall/beads","slug":"contributor-requires-interactive-prompts-and-can","errorCode":null,"errorMessage":"--contributor requires interactive prompts and cannot be used with --non-interactive","messagePattern":"--contributor requires interactive prompts and cannot be used with --non-interactive","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/init.go","lineNumber":580,"sourceCode":"\t\t}\n\n\t\t// Resolve non-interactive mode: flag > env var > terminal detection.\n\t\t// This must be computed before any interactive prompts.\n\t\tnonInteractive := isNonInteractiveInit(nonInteractiveFlag)\n\n\t\t// Validate --role flag value\n\t\tif roleFlag != \"\" {\n\t\t\tswitch roleFlag {\n\t\t\tcase \"maintainer\", \"contributor\":\n\t\t\t\t// valid\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"invalid --role %q: must be \\\"maintainer\\\" or \\\"contributor\\\"\", roleFlag)\n\t\t\t}\n\t\t}\n\n\t\t// Fail-fast: contributor/team wizards require interaction\n\t\tif nonInteractive && contributor {\n\t\t\treturn fmt.Errorf(\"--contributor requires interactive prompts and cannot be used with --non-interactive\")\n\t\t}\n\t\tif nonInteractive && team {\n\t\t\treturn fmt.Errorf(\"--team requires interactive prompts and cannot be used with --non-interactive\")\n\t\t}\n\n\t\t// Dolt is the only supported backend.\n\t\tbackend := configfile.BackendDolt\n\n\t\t// Also treat BEADS_DOLT_SERVER_MODE=1 env var as --server.\n\t\tif os.Getenv(\"BEADS_DOLT_SERVER_MODE\") == \"1\" {\n\t\t\tinitServerMode = true\n\t\t}\n\n\t\t// Shared server mode still uses a Dolt sql-server, so it must select\n\t\t// the server-backed store path during init. Without this, init can\n\t\t// persist shared-server intent in YAML while still creating an embedded\n\t\t// store and recording dolt_mode=embedded in metadata.json (GH#2946).\n\t\tif sharedServer || strings.EqualFold(os.Getenv(\"BEADS_DOLT_SHARED_SERVER\"), \"true\") || os.Getenv(\"BEADS_DOLT_SHARED_SERVER\") == \"1\" {","sourceCodeStart":562,"sourceCodeEnd":598,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/init.go#L562-L598","documentation":"The contributor/team wizard is an interactive prompt flow; combining --contributor with --non-interactive fails fast because the wizard cannot run without a TTY-driven prompt session.","triggerScenarios":"`bd init --contributor --non-interactive` (or --non-interactive supplied via env var / terminal detection per isNonInteractiveInit) together with --contributor.","commonSituations":"CI/CD or scripted setups trying to automate the contributor onboarding wizard; running bd init from a non-TTY environment (CI runner, nohup) while also passing --contributor.","solutions":["Run `bd init --contributor` in an interactive terminal without --non-interactive","For automation, use non-wizard init flags instead of the contributor wizard","If your terminal detection is wrong (piped TTY), remove any BEADS_* non-interactive env vars"],"exampleFix":"// before\nbd init --contributor --non-interactive\n// after\nbd init --contributor   # run interactively","handlingStrategy":"validation","validationCode":"if contributor && nonInteractive {\n    return fmt.Errorf(\"--contributor requires an interactive terminal; drop --non-interactive\")\n}","typeGuard":null,"tryCatchPattern":"if err := bdInit(\"--contributor\", \"--non-interactive\"); err != nil {\n    if strings.Contains(err.Error(), \"requires interactive prompts\") {\n        // rerun interactively or switch to non-wizard flags\n    }\n}","preventionTips":["Never combine wizard flags (--contributor/--team) with --non-interactive","Run wizard flows only in TTY sessions, not CI","Check/clear BEADS_* non-interactive env vars before invoking"],"tags":["cli","init","interactive","non-interactive"],"backgroundTag":"requires-interactive-terminal","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}