plandex-ai/plandex · error

error verifying email: %v

Error message

error verifying email: %v

What it means

promptSignInNewAccount wraps any failure from verifyEmail (email, host) as 'error verifying email: %v'. verifyEmail calls apiClient.CreateEmailVerification against the chosen host and then prompts for the emailed pin, so this error covers server-side verification-creation failures as well as downstream pin-prompt failures.

Source

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

	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)
	}

	if res.hasAccount {
		err := signIn(email, res.pin, host)
		if err != nil {
			return fmt.Errorf("error signing in: %v", err)
		}
	} else {
		err := createAccount(email, res.pin, host, res.isLocalMode)
		if err != nil {
			return fmt.Errorf("error creating account: %v", err)
		}
	}

	if !term.IsRepl {
		term.PrintCmds("", "")
	}

View on GitHub (pinned to e2d772072e)

Solutions

  1. Check the nested error: if it is 'error creating email verification', fix host/server connectivity; if 'error prompting pin', fix the interactive terminal.
  2. Verify the Plandex server is running and reachable at the host you entered (e.g. curl http://localhost:8099/health).
  3. Correct any host typo and re-run the sign-in flow.
  4. For self-hosted servers, confirm SMTP/email delivery is configured so verification pins are actually sent.

Example fix

// before: server not started
plandex auth (host http://localhost:8099 -> connection refused)
// after
plandex servers start && plandex auth
Defensive patterns

Strategy: retry

Validate before calling

// verify host reachability before calling verifyEmail
resp, err := http.Get(host + "/health")
if err != nil {
    return fmt.Errorf("server at %s unreachable: %w", host, err)
}
defer resp.Body.Close()

Try / catch

res, err := verifyEmail(email, host)
if err != nil {
    if strings.Contains(err.Error(), "error creating email verification") {
        // server-side problem: check host/server, then retry once
        time.Sleep(2 * time.Second)
        res, err = verifyEmail(email, host)
    }
    if err != nil { return err }
}

Prevention

When it happens

Trigger: verifyEmail returns an error: apiClient.CreateEmailVerification fails (server unreachable, invalid host, server rejects the email), or the subsequent pin prompt fails (see nested message).

Common situations: Typos in the host URL so the CLI hits the wrong server; local Plandex server not running; self-hosted server without working email delivery for verification pins; non-interactive environment blocking the pin prompt.

Related errors


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