{"record":{"id":"123736a728aa2a8c","repo":"gastownhall/beads","slug":"team-requires-interactive-prompts-and-cannot-be","errorCode":null,"errorMessage":"--team requires interactive prompts and cannot be used with --non-interactive","messagePattern":"--team requires interactive prompts and cannot be used with --non-interactive","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/init.go","lineNumber":583,"sourceCode":"\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\" {\n\t\t\tinitServerMode = true\n\t\t}\n","sourceCodeStart":565,"sourceCodeEnd":601,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/init.go#L565-L601","documentation":"Mirror of error 838 for the team wizard: --team starts an interactive prompt flow that cannot run with --non-interactive, so init fails fast with this message.","triggerScenarios":"`bd init --team --non-interactive` (or --non-interactive implied by env var / terminal detection per isNonInteractiveInit) together with --team.","commonSituations":"Scripted team/workspace setup in CI; running bd init under automation wrappers that strip TTYs; combining --team with a non-interactive env var set for other beads commands.","solutions":["Run `bd init --team` interactively without --non-interactive","For automation, use explicit non-wizard flags instead of the team wizard","Clear non-interactive env vars (or run in a real TTY) so terminal detection does not force non-interactive mode"],"exampleFix":"// before\nbd init --team --non-interactive\n// after\nbd init --team   # run interactively","handlingStrategy":"validation","validationCode":"if team && nonInteractive {\n    return fmt.Errorf(\"--team requires an interactive terminal; drop --non-interactive\")\n}","typeGuard":null,"tryCatchPattern":"if err := bdInit(\"--team\", \"--non-interactive\"); err != nil {\n    if strings.Contains(err.Error(), \"requires interactive prompts\") {\n        // rerun interactively or use non-wizard flags\n    }\n}","preventionTips":["Never pass --team together with --non-interactive","Run team wizard flows only in interactive TTY sessions","Verify terminal detection by unsetting non-interactive env vars before init"],"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"}