{"record":{"id":"490e0eb0bb8f1412","repo":"plandex-ai/plandex","slug":"error-selecting-sign-in-option-v","errorCode":null,"errorMessage":"error selecting sign in option: %v","messagePattern":"error selecting sign in option: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/cli/auth/account.go","lineNumber":150,"sourceCode":"\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error selecting or signing in to account: %v\", err)\n\t}\n\n\treturn nil\n}\n\nconst (\n\t// SignInCloudOption = \"Plandex Cloud\"\n\tSignInLocalOption = \"Local mode host\"\n\tSignInOtherOption = \"Another host\"\n)\n\nfunc promptSignInNewAccount() error {\n\tselected, err := term.SelectFromList(\"Use local mode or another host?\", []string{SignInLocalOption, SignInOtherOption})\n\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error selecting sign in option: %v\", err)\n\t}\n\n\tvar host string\n\tvar email string\n\n\tif selected == SignInLocalOption {\n\t\thost, err = term.GetRequiredUserStringInputWithDefault(\"Host:\", \"http://localhost:8099\")\n\t} else {\n\t\thost, err = term.GetRequiredUserStringInput(\"Host:\")\n\t}\n\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error prompting host: %v\", err)\n\t}\n\n\tif selected == SignInLocalOption {\n\t\temail = \"local-admin@plandex.ai\"\n\t} else {","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/cli/auth/account.go#L132-L168","documentation":"promptSignInNewAccount wraps a failure from term.SelectFromList, which asks whether to use the local-mode host or another host, as 'error selecting sign in option: %v'. This is an interactive prompt failure, not a server error — it happens before any network call.","triggerScenarios":"term.SelectFromList(\"Use local mode or another host?\", [SignInLocalOption, SignInOtherOption]) returns an error: stdin is not an interactive TTY, the user aborts (Ctrl-C), or the terminal UI cannot render the selection list.","commonSituations":"Running plandex inside CI or a Docker container without a TTY; piping stdin; running in an unusual terminal emulator or restricted environment; user cancels the prompt.","solutions":["Run the command in an interactive terminal with a valid TTY.","If in Docker/CI, use `docker run -it` or ensure stdin is attached before triggering auth setup.","Re-run the command and complete the selection instead of aborting with Ctrl-C.","Pre-create an authenticated session interactively, then run scripted commands non-interactively."],"exampleFix":"// before (CI, no TTY)\nplandex auth sign-in\n// after (allocate a TTY)\ndocker run -it plandex ./plandex auth sign-in","handlingStrategy":"validation","validationCode":"// ensure stdin is interactive before entering the sign-in flow\nif stat, _ := os.Stdin.Stat(); stat == nil || (stat.Mode()&os.ModeCharDevice) == 0 {\n    return fmt.Errorf(\"interactive terminal required for sign-in option selection\")\n}","typeGuard":null,"tryCatchPattern":"selected, err := term.SelectFromList(\"Use local mode or another host?\", opts)\nif err != nil {\n    return fmt.Errorf(\"selection aborted (%v); re-run in an interactive terminal\", err)\n}","preventionTips":["Run auth commands only in a real TTY; avoid piping stdin.","In Docker, use -it so prompts can render.","In CI, pre-authenticate once interactively and persist the session.","Don't map Ctrl-C aborts to retries — the prompt must be answered by a human."],"tags":["cli","interactive-prompt","tty"],"backgroundTag":"no-tty-interactive-prompt-failed","analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}