Paste an error to match it against the wiki. / 粘贴报错后自动匹配。
Error text / 报错原文
Failed to exchange authorization code for tokenThere was an unexpected issue setting up your account
What it means
The browser OAuth step returned a code, but Antigravity could not exchange it for a usable local token.
Most common causes
- Local TLS or certificate validation problem during token exchange
- Corporate proxy intercepting the OAuth callback
- Browser profile mismatch between sign-in and app
- Google account policy blocks the token exchange
Fastest fix
- Retry sign-in from the default browser
- Disable VPN or proxy briefly for the auth flow if policy allows
- Use a clean browser profile
- Restart the app after a successful browser confirmation
Safe fix
- Fix root certificates instead of disabling TLS validation globally
- Use an account allowed by your organization
- Keep OAuth tokens out of project files
- Record exact app version and OS when reporting
What not to do
- Do not set global TLS bypass variables permanently
- Do not paste auth codes into untrusted tools
- Do not share screenshots containing tokens
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.
node -p "process.versions.openssl" echo $HTTP_PROXY echo $HTTPS_PROXY
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 get OAuth token: state syncing error: key not found - Antigravity →
- Command exits 0 but captures zero stdout/stderr - Antigravity terminal blindness →
- Stuck on Running / Generating - Google Antigravity agent not responding →