plandex-ai/plandex · error
error getting default config: %v
Error message
error getting default config: %v
What it means
This error wraps a failure from api.Client.GetDefaultPlanConfig() in set_model's parallel fetch. The *shared.ApiError Msg is embedded into 'error getting default config: %s'. It means the default plan configuration could not be retrieved, blocking model/config setup.
Source
Thrown at app/cli/cmd/set_model.go:175
var planConfig *shared.PlanConfig
errCh := make(chan error, 3)
go func() {
var apiErr *shared.ApiError
customModelPacks, apiErr = api.Client.ListModelPacks()
if apiErr != nil {
errCh <- fmt.Errorf("error getting custom model packs: %v", apiErr.Msg)
return
}
errCh <- nil
}()
go func() {
var apiErr *shared.ApiError
defaultConfig, apiErr = api.Client.GetDefaultPlanConfig()
if apiErr != nil {
errCh <- fmt.Errorf("error getting default config: %v", apiErr.Msg)
return
}
errCh <- nil
}()
go func() {
if lib.CurrentPlanId != "" {
var apiErr *shared.ApiError
planConfig, apiErr = api.Client.GetPlanConfig(lib.CurrentPlanId)
if apiErr != nil {
errCh <- fmt.Errorf("error getting plan config: %v", apiErr.Msg)
return
}
}
errCh <- nil
}()
View on GitHub (pinned to e2d772072e)
Solutions
- Retry the command — default-config fetches are often transiently failing
- Re-authenticate if err.Msg indicates 401/403
- Check service status / err.Msg for 5xx and wait or report if server-side
- Verify network and proxy reachability to the API
Example fix
// before
errCh <- fmt.Errorf("error getting default config: %v", apiErr.Msg)
// after
errCh <- fmt.Errorf("error getting default config: %v", apiErr.Msg)
// plus retry in caller:
for i := 0; i < 3; i++ {
if err := fetch(); err == nil { break }
time.Sleep(time.Second * time.Duration(i+1))
} Defensive patterns
Strategy: retry
Validate before calling
// pre-flight: verify API reachability and auth before fetching default config
if api.Client == nil || api.Client.Token == "" {
return fmt.Errorf("not authenticated")
} Type guard
func isApiError(err error) (*shared.ApiError, bool) {
ae, ok := err.(*shared.ApiError)
return ae, ok
} Try / catch
cfg, err := api.Client.GetDefaultPlanConfig()
if err != nil {
if ae, ok := err.(*shared.ApiError); ok {
if ae.Status >= 500 {
cfg, err = retryWithBackoff(3, api.Client.GetDefaultPlanConfig)
}
}
if err != nil {
return fmt.Errorf("error getting default config: %w", err)
}
} Prevention
- Retry 5xx errors with backoff — default-config failures are often transient
- Re-authenticate on 401/403 responses
- Check service status pages during incidents
- Pin/verify CLI and API versions to avoid endpoint drift
When it happens
Trigger: GetDefaultPlanConfig() returning non-nil *shared.ApiError: expired/invalid credentials, transient network error, or a server-side failure (5xx) while serving the default config.
Common situations: API version drift where the default-config endpoint changed; token expired mid-session; temporary server incident; corporate proxy interference.
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
- error listing contexts: %v
- error getting context body: %v
- error fetching users: %s
- error fetching pending invites: %s
- error getting custom model packs: %v
AI-assisted analysis of plandex-ai/plandex@e2d772072e (2026-09-05).
Data as JSON: /api/errors/6b62443cbd50d324.
Report an issue: GitHub.