plandex-ai/plandex · error

error getting account credentials: %v

Error message

error getting account credentials: %v

What it means

checkProviderCredentialStatus returns this when cfg.HasClaudeMaxAuth and GetAccountCredentials() fails while reading the local account-credential store. The provider is graded FullyMissing and the error bubbles up through CheckCredentialStatus as 'error checking API keys/credentials'.

Source

Thrown at app/cli/lib/model_credentials.go:134

	for pub := range grouped {
		sort.SliceStable(grouped[pub], func(i, j int) bool {
			return grouped[pub][i].Priority < grouped[pub][j].Priority
		})
	}
	return grouped
}

func checkProviderCredentialStatus(cfg *shared.ModelProviderConfigSchema, authVars map[string]string) (ProviderAuthStatus, []string, error) {
	var missing []string

	if cfg.SkipAuth {
		return FullySatisfied, nil, nil
	}

	if cfg.HasClaudeMaxAuth {
		creds, err := GetAccountCredentials()
		if err != nil {
			return FullyMissing, nil, fmt.Errorf("error getting account credentials: %v", err)
		}
		if creds == nil || creds.ClaudeMax == nil {
			return FullyMissing, nil, nil
		}
	}

	if cfg.ApiKeyEnvVar != "" && authVars[cfg.ApiKeyEnvVar] == "" {
		missing = append(missing, cfg.ApiKeyEnvVar)
	}

	for _, extra := range cfg.ExtraAuthVars {
		if extra.Required && authVars[extra.Var] == "" {
			missing = append(missing, extra.Var)
		}
	}

	numRequired := 0
	for _, extra := range cfg.ExtraAuthVars {

View on GitHub (pinned to e2d772072e)

Solutions

  1. Re-authenticate to regenerate the credentials store.
  2. Fix file permissions on the credentials file/directory.
  3. Inspect the wrapped %v error for the exact storage/parse failure and address it.
  4. If Claude Max auth is not needed, remove HasClaudeMaxAuth from the provider config or skip it via claudeMaxEnabled=false.

Example fix

// before
if cfg.HasClaudeMaxAuth {
    creds, err := GetAccountCredentials()
    if err != nil { return FullyMissing, nil, fmt.Errorf(...) }
// after
if cfg.HasClaudeMaxAuth {
    creds, err := GetAccountCredentials()
    if err != nil {
        log.Printf("account credentials unavailable, treating as missing: %v", err)
        return FullyMissing, nil, nil // degrade instead of failing the whole check
    }
Defensive patterns

Strategy: fallback

Validate before calling

if _, err := os.Stat(credentialsStorePath()); err != nil {
    log.Printf("credentials store missing: %v", err) // treat Claude Max providers as FullyMissing
}

Try / catch

creds, err := GetAccountCredentials()
if err != nil {
    log.Printf("account credentials unavailable: %v", err)
    return FullyMissing, nil, nil // degrade instead of failing
}

Prevention

When it happens

Trigger: Grading any provider whose config has HasClaudeMaxAuth when GetAccountCredentials returns an error — credentials file unreadable, corrupt JSON, or a storage backend failure.

Common situations: Corrupt credentials store after an interrupted write, file permissions too strict (different user in CI), or missing HOME so the store path cannot be resolved.

Related errors


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