plandex-ai/plandex · error
error prompting org name: %v
Error message
error prompting org name: %v
What it means
This error wraps a failure from term.GetRequiredUserStringInput when the CLI prompts the user for an org name during createOrg. It means the interactive prompt failed (e.g. stdin was closed or unreadable) before an org name could be captured, so org creation aborts. It only fires in non-local mode, since local mode hardcodes the name "Local Org".
Source
Thrown at app/cli/auth/org.go:66
if shouldCreate {
return createOrg(false)
}
return nil, nil
}
func createOrg(isLocalMode bool) (*shared.Org, error) {
var err error
var name string
var autoAddDomainUsers bool
if isLocalMode {
name = "Local Org"
} else {
name, err = term.GetRequiredUserStringInput("Org name:")
}
if err != nil {
return nil, fmt.Errorf("error prompting org name: %v", err)
}
if !isLocalMode {
autoAddDomainUsers, err = promptAutoAddUsersIfValid(Current.Email)
if err != nil {
return nil, fmt.Errorf("error prompting auto add domain users: %v", err)
}
}
term.StartSpinner("")
res, apiErr := apiClient.CreateOrg(shared.CreateOrgRequest{
Name: name,
AutoAddDomainUsers: autoAddDomainUsers,
})
term.StopSpinner()
if apiErr != nil {
return nil, fmt.Errorf("error creating org: %v", apiErr.Msg)View on GitHub (pinned to e2d772072e)
Solutions
- Run the command in an interactive terminal with stdin attached to a TTY
- In CI/scripts, avoid triggering org creation interactively — create the org ahead of time or use local mode
- Check that the terminal input stream is healthy (no closed/redirected stdin)
- Re-run the command; transient I/O errors on stdin may resolve on retry
Example fix
// before (non-interactive shell) echo | plenderish-cli some-command # prompts "Org name:" -> EOF error // after plandex-cli some-command # run interactively, answer "Org name:" prompt
Defensive patterns
Strategy: validation
Validate before calling
// before invoking a flow that may prompt for an org name
fi, err := os.Stdin.Stat()
if err != nil || (fi.Mode()&os.ModeCharDevice) == 0 {
return fmt.Errorf("org creation requires an interactive terminal; stdin is not a TTY")
} Try / catch
org, err := auth.CreateOrg(false)
if err != nil {
if strings.Contains(err.Error(), "error prompting org name") {
// fall back to non-interactive path or instruct user to run in a TTY
}
return err
} Prevention
- Always run org-creating commands in an interactive shell
- In CI, pre-create the org or use local mode to skip prompting
- Never pipe/redirect stdin for commands that prompt
- Check isatty on stdin before launching interactive flows
When it happens
Trigger: Running a command that calls createOrg via resolveOrgAuth, promptNoOrgs, or selectOrg when term.GetRequiredUserStringInput("Org name:") returns an error — typically stdin is not a TTY / is closed, or the input reader hit EOF or an I/O error.
Common situations: Running plandex in CI or a piped/non-interactive shell where no terminal is attached; triggering first-run org creation in a scripted environment; terminal input stream broken after suspend/resume or redirect.
Related errors
- error prompting auto add domain users: %v
- failed to get confirmation user input: %s
- error confirming update and rebuild: %v
- failed to stat stdin: %v
- failed to read piped data: %v
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/d869af6fbaf771a2.
Report an issue: GitHub.