plandex-ai/plandex · error

error prompting host: %v

Error message

error prompting host: %v

What it means

promptSignInNewAccount wraps a failure from term.GetRequiredUserStringInputWithDefault or term.GetRequiredUserStringInput when prompting for the server host as 'error prompting host: %v'. It is an input-collection failure: empty input rejection, non-interactive stdin, or user abort.

Source

Thrown at app/cli/auth/account.go:163

func promptSignInNewAccount() error {
	selected, err := term.SelectFromList("Use local mode or another host?", []string{SignInLocalOption, SignInOtherOption})

	if err != nil {
		return fmt.Errorf("error selecting sign in option: %v", err)
	}

	var host string
	var email string

	if selected == SignInLocalOption {
		host, err = term.GetRequiredUserStringInputWithDefault("Host:", "http://localhost:8099")
	} else {
		host, err = term.GetRequiredUserStringInput("Host:")
	}

	if err != nil {
		return fmt.Errorf("error prompting host: %v", err)
	}

	if selected == SignInLocalOption {
		email = "local-admin@plandex.ai"
	} else {
		email, err = term.GetRequiredUserStringInput("Your email:")
	}

	if err != nil {
		return fmt.Errorf("error prompting email: %v", err)
	}

	res, err := verifyEmail(email, host)

	if err != nil {
		return fmt.Errorf("error verifying email: %v", err)
	}

View on GitHub (pinned to e2d772072e)

Solutions

  1. Enter a valid host URL (e.g. http://localhost:8099 for local mode) when prompted.
  2. Run in an interactive terminal so the prompt can read stdin.
  3. If using local mode, choose 'Local mode host' and accept the default instead of typing an empty custom host.
  4. Verify the target Plandex server address before re-running to avoid repeated failed prompts.

Example fix

// before
Host: (empty input -> required-input error)
// after
Host: http://localhost:8099
Defensive patterns

Strategy: validation

Validate before calling

// pre-validate the host you intend to enter
host := "http://localhost:8099"
if u, err := url.Parse(host); err != nil || u.Scheme == "" || u.Host == "" {
    return fmt.Errorf("invalid host %q: must include scheme and host", host)
}

Try / catch

host, err := term.GetRequiredUserStringInput("Host:")
if err != nil {
    return fmt.Errorf("host prompt failed (%v); enter a full URL like http://localhost:8099", err)
}

Prevention

When it happens

Trigger: The host prompt (default http://localhost:8099 for local mode, or required free-text for another host) fails: user submits empty input to a required prompt, stdin is unavailable/non-interactive, or the prompt is cancelled.

Common situations: Scripted/CI runs without a TTY; user presses Enter on empty input in the 'Another host' path; typo of only whitespace with required-input validation; aborted prompt.

Related errors


AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05). Data as JSON: /api/errors/852f86d51e1e89e1. Report an issue: GitHub.