Google Antigravity Errors: How to Fix the Common Ones
TL;DR — A senior dev's field guide to fixing the most common Google Antigravity (agy) errors: login failures, quota walls, model auth issues, and the Codex/Claude API gotchas behind them.
It was a Tuesday night when I first opened Google Antigravity. I'd seen the hype, forked my workflow into it, typed a prompt, and got slapped with a wall of red text before I'd written a single line of real code. If you're reading this, you've probably hit the same wall. Good news: most Antigravity errors fall into about five buckets, and once you understand the cause, the fixes are fast.
This is a practitioner's guide, not a press release. I'll show you the actual error messages, the commands that fix them, and the traps that cost me an hour each so they don't cost you the same.
What Google Antigravity Actually Is
Let's set the baseline so the errors make sense. Google Antigravity (the CLI is often referred to as agy) was publicly released in November 2025 — not December, despite what some recycled blog posts claim. It's a VS Code fork with Gemini 3 as the default model, built around an agentic, multi-pane workflow.
A quick honesty note: quota numbers, config file paths, and some flag names are community-reported and have changed between early builds. Treat any specific number you read online (including here) as "verify against
--helpand the official docs." I'll flag where this matters.
Because it's a young tool wrapping multiple model providers, most "Antigravity errors" are really auth and quota errors from the underlying model backends (Gemini, and optionally OpenAI Codex or Anthropic Claude if you wire those in). Knowing that one fact will save you a lot of confused debugging.
Problem 1: Login and Authentication Failures
The single most common first-run failure is authentication. You open Antigravity, it tries to reach a model, and you get something like:
Error: authentication_error (401)
Could not authenticate request. Check your credentials.
Cause
You're either not logged into the Google account that has Antigravity access, or you've wired in a secondary provider (OpenAI/Anthropic) whose credentials aren't set. A 401 almost always means the key/session is missing or wrong, not that you're out of money — that's a different error (more below).
Fix
For the default Gemini login, follow the in-app sign-in flow rather than hunting for a flag. For secondary providers, here's where people shoot themselves in the foot.
If you're adding OpenAI Codex CLI as a backend, do the device login correctly:
# Correct device-login flag is --device-auth (NOT --device-code)
codex login --device-auth
If you'd rather use an API key, never paste the key as a command-line argument — it lands in your shell history and process list. Pipe it via stdin instead:
# Safe: key never appears as an argument
printenv OPENAI_API_KEY | codex login --with-api-key
Codex is the @openai/codex package and needs Node 18+. Install it without sudo global hacks — use a Node version manager:
nvm install 18
nvm use 18
npm install -g @openai/codex
Why avoid
sudo npm install -g? It creates root-owned files in your global modules and breaks the next non-sudo install withEACCES. I've watched three teammates fall into this. Usenvmand the problem disappears.
For Claude Code as a backend, prefer the in-session /login command rather than inventing CLI auth flags — version-specific flags drift, and /login is the stable path.
Problem 2: The Quota Wall (429)
You're cruising, the agent is working, and suddenly:
Error: rate_limit_error (429)
You have exceeded your current quota. Retry after 38s.
Cause
Antigravity's agentic mode fires many model calls per task — planning, editing, verifying. On free or preview tiers, you burn through request quotas far faster than in a normal chat. The 429 is the backend telling you to slow down, not a bug.
Fix
- Respect the
Retry-Afterheader. Don't hammer; back off the number of seconds it tells you. - Reduce agent fan-out. Break a giant "refactor the whole repo" prompt into smaller scoped tasks. Fewer files in context = fewer calls.
- Switch models for cheap iterations. Use a lighter model for drafting and reserve the heavy model for final passes.
- Check your tier. Community-reported free quotas have changed repeatedly — confirm your current limit in the official billing console rather than trusting a blog's number.
Problem 3: Decoding Provider Error Codes
Half the battle is reading the status code correctly. If you wire Claude into Antigravity, here is the authoritative mapping straight from Anthropic's official error reference — memorize it, because a lot of internet folklore gets this wrong:
| HTTP status | Error type | What it really means |
|---|---|---|
| 400 | invalid_request_error |
Malformed request / bad params |
| 401 | authentication_error |
Missing or invalid API key |
| 403 | permission_error |
No access to the resource |
| 403 | billing_error |
Billing/credit problem (same status, distinguished by .type) |
| 404 | not_found_error |
Resource doesn't exist |
| 413 | request_too_large |
Payload exceeds size limit |
| 429 | rate_limit_error |
Quota / rate limit hit |
| 500 | api_error |
Server-side error |
| 529 | overloaded_error |
API temporarily overloaded |
Three traps that catch almost everyone:
- There is no HTTP 402. Billing failures do not return 402. A credit problem surfaces as 403 with
type: billing_error— same status as a normal permission error, distinguished only by the.typefield. If you wrote a402 billing_errorhandler, delete it. request_too_largeis 413, not 400. A huge prompt is a size error, not a validation error. If you're catching only 400, oversized requests slip through.- 529 is overload, not your fault. Back off and retry with exponential backoff. I wrote a dedicated breakdown of this one — see the Claude API 529 overloaded error guide for a retry strategy that actually works.
The practical takeaway: branch on status first, then
.typefor the 403 case. Treating every 403 as "permission denied" will hide billing problems until your boss asks why nothing ran.
Problem 4: Model Selection and Context Errors
Sometimes Antigravity refuses mid-task with a model or context error:
Error: not_found_error (404)
The requested model is unavailable for this account.
Cause
You've selected a model your account/region can't access, or a preview model that got rotated out. Antigravity moves fast, and model identifiers change between builds.
Fix
- Fall back to the default Gemini 3 model to confirm the tool itself works, then re-select.
- Don't hardcode preview model IDs in scripts. They expire. Resolve the available list at runtime.
- Verify with
--help. Any model flag you read in a tutorial may be stale — runagy --help(or the equivalent) against your installed version.
Step-by-Step: A Reliable First-Run Recovery
When Antigravity won't start clean, walk this sequence instead of guessing:
- Confirm the install.
agy --version(verify the exact command via--help). A missing binary means a broken install, not an auth issue. - Sign into the default provider first. Get Gemini working before adding any secondary backend.
- Add secondary providers one at a time. Test Codex (
codex login --device-auth) or Claude (/login) in isolation so you know which one fails. - Read the status code, not the vibe. Map it against the table above. 401 = creds, 403 = permission/billing, 413 = too big, 429 = quota, 529 = overload.
- Check the config path. Community-reported config locations vary by OS and version — find yours via the docs rather than copy-pasting a stranger's path.
Do's and Don'ts
| Do | Don't |
|---|---|
Pipe API keys via stdin (printenv KEY | codex login --with-api-key) |
Paste keys as CLI args (leaks to history/process list) |
Use codex login --device-auth |
Use --device-code (wrong flag) |
Install Codex via nvm (Node 18+) |
sudo npm install -g (creates EACCES traps) |
Branch on status then .type for 403 |
Write a 402 billing_error handler (402 doesn't exist) |
Treat request_too_large as 413 |
Catch it as 400 |
Verify flags/paths with --help & official docs |
Trust hardcoded quota numbers or preview model IDs |
Five Field Tips That Save Real Time
- Keep a provider matrix. Note which model each provider serves and which auth method each uses. When something breaks, you'll know exactly which login to re-run.
- Set
OPENAI_API_KEYas an env var, not in a config file. Thenprintenv | codex login --with-api-keyworks cleanly and nothing sensitive sits in plaintext config. - Scope your prompts. Antigravity's agent loop multiplies calls. Smaller tasks mean fewer 429s and cheaper iterations — this is the single biggest quota saver.
- Implement exponential backoff for 429/500/529. These are transient. A 2s → 4s → 8s retry handles the vast majority without manual intervention.
- Pin your tool version in notes. When you hit a flag that "doesn't exist," half the time it's a version mismatch. Knowing your exact build turns a 30-minute hunt into a 30-second
--helpcheck.
Wrap-Up
Most Google Antigravity errors aren't really Antigravity's fault — they're auth and quota signals from the model backends underneath, dressed up in red text. Once you internalize that, the fixes become mechanical: get the default Gemini login working, add secondary providers (Codex with --device-auth, Claude with /login) one at a time, pipe keys via stdin, and read the HTTP status before reacting. Remember the three folklore-busters: there is no 402 (billing is 403 + .type), request_too_large is 413, and 529 means back off and retry.
Your next action: run agy --version and agy --help right now, confirm your default model loads, then re-add just one secondary provider and test it in isolation. Build the habit of mapping every error to its status code, and Antigravity goes from frustrating to genuinely fast.
Want to go deeper on the trickiest one? Read the Claude API 529 overloaded error guide for a battle-tested retry pattern, and browse our other developer troubleshooting guides for more field notes. For authoritative references, keep Anthropic's error codes documentation and OpenAI's Codex CLI docs bookmarked — they're the source of truth when a tutorial (including this one) goes stale.