Paste an error to match it against the wiki. / 粘贴报错后自动匹配。
Error text / 报错原文
Failed to get OAuth tokenstate syncing error: key not foundInvalid Google Cloud Code Assist credentials
What it means
The local token store and the active Google session are out of sync. The IDE can show a signed-in state while background services cannot fetch credentials.
Most common causes
- Machine sleep or account switch invalidated cached tokens
- Multiple Google accounts share the same browser profile
- Cloud Code Assist credentials are stale
- Account lacks required project or API access
Fastest fix
- Sign out, fully close the app, and sign in again
- Clear only Antigravity auth token cache if normal sign-in loops
- Use the same Google account in browser and IDE
- Check whether required Google APIs are enabled
Safe fix
- Use a dedicated work profile for agent IDEs
- Avoid mixing personal and Workspace accounts in one session
- Keep audit logs for organization accounts
- Prefer service accounts for production MCP servers
What not to do
- Do not store Google OAuth tokens in repo files
- Do not switch accounts mid-agent run
- Do not ignore repeated auth failures before destructive tasks
How to confirm the fix
Run the smallest reproducible command first, then retry the agent task only after authentication, quota, and tool discovery are stable.
echo $GOOGLE_APPLICATION_CREDENTIALS gcloud auth list gcloud config list account
Related errors
- Not logged in - Please run /login - Claude Code →
- Agent execution terminated due to error - Google Antigravity →
- Error calling initialize: EOF - Antigravity MCP →
- Failed to exchange authorization code for token - Antigravity →
- Command exits 0 but captures zero stdout/stderr - Antigravity terminal blindness →
- Stuck on Running / Generating - Google Antigravity agent not responding →