{"record":{"id":"de78eb8cf4918e2f","repo":"sipeed/picoclaw","slug":"no-project-id-stored-try-logging-in-again","errorCode":null,"errorMessage":"no project id stored. Try logging in again","messagePattern":"no project id stored\\. Try logging in again","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/picoclaw/internal/auth/helpers.go","lineNumber":456,"sourceCode":"\tif err != nil || cred == nil {\n\t\treturn fmt.Errorf(\n\t\t\t\"not logged in to Google Antigravity.\\nrun: picoclaw auth login --provider google-antigravity\",\n\t\t)\n\t}\n\n\t// Refresh token if needed\n\tif cred.NeedsRefresh() && cred.RefreshToken != \"\" {\n\t\toauthCfg := auth.GoogleAntigravityOAuthConfig()\n\t\trefreshed, refreshErr := auth.RefreshAccessToken(cred, oauthCfg)\n\t\tif refreshErr == nil {\n\t\t\tcred = refreshed\n\t\t\t_ = auth.SetCredential(\"google-antigravity\", cred)\n\t\t}\n\t}\n\n\tprojectID := cred.ProjectID\n\tif projectID == \"\" {\n\t\treturn fmt.Errorf(\"no project id stored. Try logging in again\")\n\t}\n\n\tfmt.Printf(\"Fetching models for project: %s\\n\\n\", projectID)\n\n\tmodels, err := providers.FetchAntigravityModels(cred.AccessToken, projectID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error fetching models: %w\", err)\n\t}\n\n\tif len(models) == 0 {\n\t\treturn fmt.Errorf(\"no models available\")\n\t}\n\n\tfmt.Println(\"Available Antigravity Models:\")\n\tfmt.Println(\"-----------------------------\")\n\tfor _, m := range models {\n\t\tstatus := \"✓\"\n\t\tif m.IsExhausted {","sourceCodeStart":438,"sourceCodeEnd":474,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/cmd/picoclaw/internal/auth/helpers.go#L438-L474","documentation":"Validation guard in authModelsCmd: a google-antigravity credential exists and was refreshed if needed, but its ProjectID field is empty, so the models API call has no project to query. Usually means the credential predates project capture or the store entry was partially written; re-login is the prescribed fix.","triggerScenarios":"Thrown at cmd/picoclaw/internal/auth/helpers.go:456 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Log out of google-antigravity and log in again so the credential captures the project id","Verify with auth status that the provider entry is complete","Check that the login flow's project-selection step was not skipped or cancelled"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","contentChangedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}