{"record":{"id":"569cf045f923822f","repo":"plandex-ai/plandex","slug":"error-prompting-name-v","errorCode":null,"errorMessage":"error prompting name: %v","messagePattern":"error prompting name: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/cli/auth/account.go","lineNumber":306,"sourceCode":"\t}\n\n\tfmt.Printf(\"✅ Signed in as %s | Org: %s\\n\", color.New(color.Bold, term.ColorHiGreen).Sprintf(\"<%s> %s\", Current.UserName, Current.Email), color.New(term.ColorHiCyan).Sprint(Current.OrgName))\n\tfmt.Println()\n\n\treturn nil\n}\n\nfunc createAccount(email, pin, host string, isLocalMode bool) error {\n\tvar name string\n\n\tif isLocalMode {\n\t\tname = \"Local Admin\"\n\t} else {\n\t\tvar err error\n\t\tname, err = term.GetUserStringInput(\"Your name:\")\n\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error prompting name: %v\", err)\n\t\t}\n\t}\n\n\tterm.StartSpinner(\"🌟 Creating account...\")\n\tres, apiErr := apiClient.CreateAccount(shared.CreateAccountRequest{\n\t\tEmail:    email,\n\t\tUserName: name,\n\t\tPin:      pin,\n\t}, host)\n\tterm.StopSpinner()\n\n\tif apiErr != nil {\n\t\treturn fmt.Errorf(\"error creating account: %v\", apiErr.Msg)\n\t}\n\n\tif res.IsLocalMode {\n\t\tisLocalMode = true\n\t}","sourceCodeStart":288,"sourceCodeEnd":324,"githubUrl":"https://github.com/plandex-ai/plandex/blob/e2d772072efadbe41d2946d97d79be55532dbab5/app/cli/auth/account.go#L288-L324","documentation":"createAccount prompts for the user's display name via term.GetUserStringInput when not in local mode; if that prompt fails it returns \"error prompting name: %v\". This is an interactive-input failure before any account is created.","triggerScenarios":"term.GetUserStringInput(\"Your name:\") returns an error — stdin closed/EOF, non-interactive terminal, or the user aborting the prompt.","commonSituations":"Running `auth signup` piped/redirected (no TTY), in CI, or the user pressing Ctrl+C/Ctrl+D at the name prompt.","solutions":["Run the signup command in an interactive terminal.","Avoid piping stdin (e.g. `echo x | myapp auth signup`).","Use local mode, which skips the prompt by setting name to \"Local Admin\".","Re-run the command and provide a name when prompted."],"exampleFix":"// before\necho \"\" | myapp auth signup   # EOF on name prompt\n// after\nmyapp auth signup             # interactive TTY, type the name when asked","handlingStrategy":"validation","validationCode":"stat, _ := os.Stdin.Stat()\nif (stat.Mode() & os.ModeCharDevice) == 0 {\n    return fmt.Errorf(\"stdin is not a TTY; run auth signup interactively\")\n}","typeGuard":null,"tryCatchPattern":"if err := createAccount(email, pin, host, false); err != nil {\n    if strings.Contains(err.Error(), \"error prompting name\") {\n        fmt.Fprintln(os.Stderr, \"Name prompt failed (no interactive terminal?). Run in a TTY or use local mode:\", err)\n    }\n    return err\n}","preventionTips":["Run interactive auth commands in a real terminal.","Do not pipe or redirect stdin into signup.","Detect non-TTY stdin early and fail with a clear message.","Use local mode when interaction is impossible."],"tags":["cli","input","interactive"],"backgroundTag":"stdin-not-a-tty","analyzedSha":"e2d772072efadbe41d2946d97d79be55532dbab5","analyzedAt":"2026-09-05T20:56:53.631Z","contentChangedAt":"2026-09-05T20:56:53.631Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}