sipeed/picoclaw · error

not logged in to Google Antigravity. run: picoclaw auth…

Error message

not logged in to Google Antigravity.
run: picoclaw auth login --provider google-antigravity

What it means

Validation guard in authModelsCmd: no stored credential exists for the 'google-antigravity' provider (GetCredential errored or returned nil), so the model listing — which requires an authenticated Antigravity token and project — cannot proceed. The message embeds the exact login command to run; it fires before any token refresh or API call.

Solutions

  1. Run: picoclaw auth login --provider google-antigravity and retry
  2. If login was done before, check that the credential store is readable and the entry was not deleted
  3. Use picoclaw auth status to confirm the provider shows as logged in
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cmd/picoclaw/internal/auth/helpers.go:439 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/92abcb82ac6a36f6. Report an issue: GitHub.

Appendix: source

Thrown at cmd/picoclaw/internal/auth/helpers.go:439

		if provider == "anthropic" && cred.AuthMethod == "oauth" {
			usage, err := auth.FetchAnthropicUsage(cred.AccessToken)
			if err != nil {
				fmt.Printf("    Usage: unavailable (%v)\n", err)
			} else {
				fmt.Printf("    Usage (5h):  %.1f%%\n", usage.FiveHourUtilization*100)
				fmt.Printf("    Usage (7d):  %.1f%%\n", usage.SevenDayUtilization*100)
			}
		}
	}

	return nil
}

func authModelsCmd() error {
	cred, err := auth.GetCredential("google-antigravity")
	if err != nil || cred == nil {
		return fmt.Errorf(
			"not logged in to Google Antigravity.\nrun: picoclaw auth login --provider google-antigravity",
		)
	}

	// Refresh token if needed
	if cred.NeedsRefresh() && cred.RefreshToken != "" {
		oauthCfg := auth.GoogleAntigravityOAuthConfig()
		refreshed, refreshErr := auth.RefreshAccessToken(cred, oauthCfg)
		if refreshErr == nil {
			cred = refreshed
			_ = auth.SetCredential("google-antigravity", cred)
		}
	}

	projectID := cred.ProjectID
	if projectID == "" {
		return fmt.Errorf("no project id stored. Try logging in again")
	}

View on GitHub (pinned to 49183d7e8d)