plandex-ai/plandex · error

error getting plan config: %v

Error message

error getting plan config: %v

What it means

This error wraps a failure from api.Client.GetDefaultPlanConfig() during the 'new' command, which fetches the default plan configuration to seed a new plan. Any API error is funneled into errCh with this message. It is the same underlying call as error 60 but on the plan-creation path.

Source

Thrown at app/cli/cmd/new.go:64

	var planId string
	var config *shared.PlanConfig

	go func() {
		res, apiErr := api.Client.CreatePlan(lib.CurrentProjectId, shared.CreatePlanRequest{Name: name})
		if apiErr != nil {
			errCh <- fmt.Errorf("error creating plan: %v", apiErr.Msg)
			return
		}
		planId = res.Id
		errCh <- nil
	}()

	go func() {
		var apiErr *shared.ApiError
		config, apiErr = api.Client.GetDefaultPlanConfig()
		if apiErr != nil {
			errCh <- fmt.Errorf("error getting plan config: %v", apiErr.Msg)
			return
		}
		errCh <- nil
	}()

	for i := 0; i < 2; i++ {
		err := <-errCh
		if err != nil {
			term.OutputErrorAndExit("Error: %v", err)
		}
	}

	err := lib.WriteCurrentPlan(planId)

	if err != nil {
		term.OutputErrorAndExit("Error setting current plan: %v", err)
	}

View on GitHub (pinned to e2d772072e)

Solutions

  1. Re-authenticate and retry the 'new' command
  2. Check server status / network connectivity
  3. Update the CLI to match the current API
  4. Read apiErr.Msg for the exact server-side reason
Defensive patterns

Strategy: retry

Validate before calling

if auth.Current.UserId == "" {
    return fmt.Errorf("not authenticated")
}

Type guard

var apiErr *shared.ApiError
defaultConfig, apiErr = api.Client.GetDefaultPlanConfig()
if apiErr != nil {
    // handle
}

Try / catch

config, apiErr := api.Client.GetDefaultPlanConfig()
if apiErr != nil {
    if isTransient(apiErr.StatusCode) { retryWithBackoff(3) } else { return apiErr }
}

Prevention

When it happens

Trigger: GetDefaultPlanConfig returns non-nil *shared.ApiError while creating a new plan — unauthenticated request, server 5xx, or connectivity failure.

Common situations: Expired auth token, API server outage, backend schema change to the default config endpoint, proxy/firewall blocking HTTPS.

Understand the failure class

Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.

Related errors


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