plandex-ai/plandex · warning

error generating plan name

Error message

error generating plan name: %v

What it means

model.GenPlanName failed while generating a descriptive name for a plan still called 'draft'. GenPlanName performs an internal LLM call; provider errors, auth failures, or context cancellation surface here. The wrapped error is sent on errCh and loading aborts (plan keeps its draft name).

Solutions

  1. Check the wrapped error for the underlying LLM failure (usually auth or network)
  2. Verify provider API keys/auth vars, then retry the tell
  3. Ensure the plan has enough content to generate a name, or rename the plan manually so GenPlanName is skipped
  4. Retry later if the provider was rate-limited

Example fix

// before
authVars["ANTHROPIC_API_KEY"] = "" // name-gen LLM call fails
// after
authVars["ANTHROPIC_API_KEY"] = os.Getenv("ANTHROPIC_API_KEY") // set before Tell; draft gets renamed
Defensive patterns

Strategy: fallback

Validate before calling

// ensure provider auth exists before Tell (plan rename needs an LLM call)
if authVars["ANTHROPIC_API_KEY"] == "" && authVars["OPENAI_API_KEY"] == "" {
    return errors.New("no provider API key configured; plan naming will fail")
}

Try / catch

select {
case err := <-errCh:
    if strings.HasPrefix(err.Error(), "error generating plan name:") {
        // non-fatal: proceed with draft name or set a manual name, retry rename later
    }
case <-doneCh:
    // rename succeeded
}

Prevention

When it happens

Trigger: GenPlanName's internal LLM request fails during plan rename inside db.WithTx setup: invalid provider key, provider timeout, empty plan summary to name from, or canceled context.

Common situations: First tell on a brand-new draft plan while the provider API key is invalid/expired; provider rate limiting; network outage at plan creation time.

Related errors


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

Appendix: source

Thrown at app/server/model/plan/tell_load.go:109

			}
			orgUserConfig = orgUserConfigRes

			if plan.Name == "draft" {
				name, err := model.GenPlanName(
					auth,
					plan,
					settings,
					orgUserConfig,
					clients,
					authVars,
					req.Prompt,
					active.SessionId,
					active.Ctx,
				)

				if err != nil {
					log.Printf("Error generating plan name: %v\n", err)
					errCh <- fmt.Errorf("error generating plan name: %v", err)
					return
				}

				err = db.WithTx(active.Ctx, "rename plan", func(tx *sqlx.Tx) error {
					err := db.RenamePlan(planId, name, tx)

					if err != nil {
						log.Printf("Error renaming plan: %v\n", err)
						return fmt.Errorf("error renaming plan: %v", err)
					}

					err = db.IncNumNonDraftPlans(currentUserId, tx)

					if err != nil {
						log.Printf("Error incrementing num non draft plans: %v\n", err)
						return fmt.Errorf("error incrementing num non draft plans: %v", err)
					}

View on GitHub (pinned to e2d772072e)