Support keyword: antigravity cli wsl oauth fix

Antigravity CLI WSL OAuth fix

When auth fails in WSL or SSH, the problem is often the browser handoff, account selection, or token storage, not the install command itself.

Updated on 2026-05-26. Independent guide. Use official Google links for downloads and account actions.

Why WSL auth fails

WSL, SSH, containers, and headless servers often cannot open the same browser session as a local desktop terminal. The CLI may print an authorization URL or code flow instead of opening a browser automatically. If you miss that URL, choose the wrong Google account, or run the flow in the wrong environment, the CLI can look "logged out" even after installation succeeded.

Do not type your Google password into the terminal or a third-party page. Use the official browser authorization flow shown by the CLI and verify the domain before approving access.

Step-by-step fix

  1. Confirm the CLI starts locally or in WSL and prints an auth instruction.
  2. Copy the authorization URL into your normal browser if auto-open fails.
  3. Choose the Google account that has Antigravity access.
  4. Return to the terminal and complete any code or callback step.
  5. Restart the CLI in the same WSL distribution or SSH account.
  6. Run a read-only prompt in an empty folder to confirm the session works.

If auth still does not stick

CheckWhy
Same Linux userTokens can be stored under the user account that completed the flow.
Correct WSL distroUbuntu, Debian, and other distros have separate homes and config files.
Clock/time syncOAuth flows can fail when system time is very wrong.
Corporate browser policyEnterprise accounts can block or restrict app authorization.
MCP OAuth separatelyMCP servers can have their own OAuth token file and auth provider.

How to avoid repeating the same auth loop

When the CLI keeps asking you to sign in, stop and capture the environment instead of approving the same browser prompt again and again. Note whether you are in native Windows, WSL, SSH, a dev container, or a remote VM. Then note which browser handled the OAuth approval and which Linux user ran the CLI. In WSL, two terminals can look similar while using different distributions or home directories.

If the account works in one environment but not another, the likely problem is local token storage or browser handoff. If the account fails everywhere, the likely problem is entitlement, plan access, or an organization policy. This distinction helps you decide whether to fix the shell, inspect tokens, or check official account settings before reinstalling the CLI.

Sources: official Google Antigravity product pages, Google Antigravity CLI documentation, and the Google Developers transition announcement. This site is an independent guide and is not affiliated with Google.

FAQ

Why does Antigravity CLI auth fail in WSL?

WSL often needs a browser authorization URL or code flow because it cannot always open the desktop browser directly.

Should I paste my Google password into the terminal?

No. Use the official browser authorization flow only.

Is WSL auth the same as MCP OAuth?

Not always. MCP servers can have separate OAuth token storage and auth provider settings.

Related Antigravity CLI pages