Fixing Google Antigravity Pro Authentication on Windows 10 + WSL2

posted Originally published at dev.to 6 min read

Google Antigravity is Google's new agent-first IDE that promises powerful AI-assisted development. However, getting the Pro features to work on Windows 10 with WSL2 (Ubuntu 24.04.3 LTS) can be challenging due to authentication issues. This comprehensive guide will walk you through every step needed to get your Pro/Ultra subscription working seamlessly.

The Problem

When running Antigravity in WSL2, the authentication handshake between your Linux terminal and Windows browser often breaks or times out. This happens because WSL2 is a virtualized environment, and the redirect token struggles to find its way back to the WSL instance.

Common symptoms include:

  • Browser opens but IDE stays on loading screen
  • Browser Authentication is successful but the Agent Panel still says "Reqire Authentication" (or something similar), even though the Antigravity Settings > Account Screen shows Account as already signed in.
  • "Invalid Token" or "Login Expired" errors
  • "Not Eligible" or "Unauthorized" messages
  • Empty responses when running agy commands

Prerequisites

Before starting, ensure you have:

  • Windows 10 with WSL2 installed
  • Ubuntu 24.04.3 LTS (or similar)
  • Google Antigravity installed on Windows
  • A Google AI Pro or Ultra subscription using a personal Gmail account.

Step 1: Fix the Silent Login Loop

The first issue to address is WSL2's default NAT networking, which can hide the local ports Antigravity uses to listen for login signals.

Enable Mirrored Networking

  • On Windows, navigate to %USERPROFILE% (e.g., C:\Users\YourName)
  • Create or edit a file named .wslconfig
  • Add the following configuration:
[wsl2]
networkingMode=mirrored
  • Restart WSL by opening PowerShell as Administrator and running:
wsl --shutdown

Note: You may start getting this message on WSL Startup, especially on Windows 10 (shouldn't theoretically appear on Windows 11):

wsl: Mirrored networking mode is not supported: Windows version 19045.6466 does not have the required features.
Falling back to NAT networking.

In which case, you should remove the unsupported setting from your global config to get rid of the warning every time you boot/reboot and open Ubuntu, as WSL2 cannot enable this mode and defaults back to the standard NAT (Network Address Translation).

Instead, you can try the following config to ensure that Agents always reliably reach local addresses (Supported on Windows 10):

[wsl2]
localhostForwarding=true

Add or ensure these lines exist in %USERPROFILE%\.wslconfig. Save and run wsl --shutdown in your terminal.

Step 2: Synchronize Your System Clock

Google's OAuth 2.0 authentication is highly sensitive to time drift. WSL2 clocks often drift when a laptop sleeps (like in my case), causing tokens to be rejected as expired.

Run this in your Ubuntu terminal:

sudo ntpdate time.windows.com

# If you don't have ntpdate installed:
sudo apt install util-linux-extra && sudo hwclock -s

Step 3: Try Authentication again

  1. If GUI login continues to fail, manually Sign out from your account in the Antigravity Settings > Account Screen.
  2. Close and Restart the IDE.
  3. Click on the Google Sign in button in the top right and Authorize your Google AI Pro account.
  4. Close the Antigravity Sign-in confirmation page.
  5. If the issue persists, repeat the first step and continue reading below.

Step 4: Verify Account Eligibility

Many authentication failures are actually due to account restrictions:

Account Type

  • Personal accounts (@gmail.com) have the highest success rate
  • Workspace accounts may require admin approval for "Experimental Google AI Services"

Regional Matching

Ensure your Windows Region, Google Account Region, and IP address (no VPN) all match. Mismatched regions can cause silent authentication failures.

Step 5: Fix Missing WSL Extension Scripts

A known bug in early Antigravity builds causes missing WSL helper scripts. Here's how to fix it:

Manual Script Extraction

  1. Download the Remote - WSL extension from the VS Code Marketplace
  2. Click "Download VSIX" (downloads a .vsix file) if in IDE extensions panel or use a tool like VSIX Downloader for web download.
  3. Rename the file from .vsix to .zip
  4. Open the zip and navigate to extension/scripts/
  5. Copy all files (especially wslCode.sh and wslDownload.sh)
  6. Paste into: %LOCALAPPDATA%\Programs\Antigravity\resources\app\extensions\antigravity-remote-wsl\scripts\

Fix the Launcher ID

Even with scripts present, you need to update the extension ID reference:

  1. Navigate to %LOCALAPPDATA%\Programs\Antigravity\bin\
  2. Open the antigravity file in Notepad
  3. Find: WSL_EXT_ID="ms-vscode-remote.remote-wsl"
  4. Change to: WSL_EXT_ID="google.antigravity-remote-wsl"
  5. Save and restart your WSL terminal

Test WSL Sign In (Command Palette Method)

Try Authentication in WSL:

  1. Open Antigravity on Windows
  2. Press Ctrl + Shift + P
  3. Type "WSL" and select Remote-WSL: Connect to WSL
  4. The bottom-left corner should show [WSL: Ubuntu]
  5. Try signing in from this connected state

Step 6: Create the WSL-to-Windows Bridge

To use agy commands from your Ubuntu terminal, you need to create a proper bridge to the Windows binary.

Create the Wrapper Script

  • Create the local bin directory:
mkdir -p ~/.local/bin
  • Create the agy wrapper (replace [YOUR_WINDOWS_USERNAME] with your actual Windows username):
cat > ~/.local/bin/agy <<'EOF'
#!/usr/bin/env bash
# Robust wrapper to bridge WSL -> Windows CMD -> Antigravity
# REPLACE [YOUR_WINDOWS_USERNAME] with your actual folder name

WIN_USER="[YOUR_WINDOWS_USERNAME]"
WIN_PATH="C:\\Users\\${WIN_USER}\\AppData\\Local\\Programs\\Antigravity\\bin\\antigravity.cmd"

# Call via cmd.exe to ensure Windows environment is initialized
# cd to C: drive to avoid UNC path warnings
cd /mnt/c && cmd.exe /c "${WIN_PATH}" "$@"
EOF
  • Make it executable:
chmod +x ~/.local/bin/agy
  • Add to your PATH:
export PATH="$HOME/.local/bin:$PATH"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Verify Your Windows Username

Before running the wrapper, verify your path:

ls /mnt/c/Users/

Update the WIN_USER variable in the script to match exactly how your Windows username folder is spelled.

Enable WSL Interoperability

Ensure WSL can launch Windows processes by checking /etc/wsl.conf:

cat /etc/wsl.conf

If it doesn't exist or is empty, create it with these settings:

[interop]
enabled=true
appendWindowsPath=true

Then restart WSL with wsl --shutdown from PowerShell.

Step 7: Verify Pro Authentication

Once everything is set up, verify your CLI Setup:

# Check version
agy --version

# List available commands
agy --help

# Open IDE in current directory
agy .

Now try signing in again to your Google account. The Agent Panel should be available now, and the Antigravity Settings > Account Screen shows Account as already signed in. Expected output for Agent Panel:

  • Tier: Pro or Ultra
  • Model: Gemini 3 Pro or Gemini 3 Flash, etc.
  • Token Limit: 1M+ tokens

Use Pro Agents

Now you can invoke high-level agents directly on your WSL files:

agy chat "Analyze the structure of this repo and suggest refactoring opportunities"

Because you're authenticated as Pro, the agent will use the full index to understand your entire codebase structure.

Troubleshooting Quick Reference

Issue Symptom Fix
Network Browser opens, IDE stays loading Enable networkingMode=mirrored in .wslconfig
Clock Drift "Invalid Token" or "Login Expired" Run sudo hwclock -s
Account Type "Not Eligible" Use personal @gmail.com account
Missing Scripts IDE won't connect to WSL Download and extract scripts from VS Code Marketplace
Wrong Extension ID Connection fails silently Update WSL_EXT_ID in launcher script
UNC Path Warnings Warnings in terminal output Use cd /mnt/c && in wrapper script

Common Commands

# Open current directory in Antigravity
agy .

# Check process usage and diagnostic information
agy --status

# Check version
agy --version

# Get help
agy --help

Pro Tips

  1. Persistent Sessions: Enable "Persistent Agent" in Antigravity UI to keep agents running even if you close the terminal

  2. Project Indexing: Let Antigravity fully index your project before asking complex questions for better results

  3. Token Limits: Pro users get 1M+ token context windows, perfect for analyzing large codebases

  4. Regional Consistency: Avoid using VPNs during authentication to prevent region mismatch issues

Conclusion

Getting Google Antigravity Pro working on WSL2 requires bridging the gap between the Windows and Linux environments. By following these steps—fixing networking, synchronizing clocks, creating proper symlinks, and enabling interoperability—you'll unlock the full power of Google's agentic IDE.

The effort is worth it: once configured, you'll have access to powerful AI agents that can understand and refactor your entire codebase, all while working seamlessly in your WSL2 development environment.

Additional Resources


Last updated: January 2026 | Tested on Windows 10 + WSL2 Ubuntu 24.04.3 LTS

1 Comment

1 vote

More Posts

Is Google Meet HIPAA Compliant? Healthcare Video Conferencing Guide

Huifer - Feb 14

Windows 10 officially ends on October 14, 2025

Winsides.com - Oct 10, 2025

Windows 10 change time zone you do not have permission

CodersMyth - Mar 23

Why Does the System Clock Break on Windows + Linux Dual Boot?

Igor Giamoniano - Coisa de Dev - Dec 29, 2025

How to Enable Long Paths on Windows 11?

Winsides.com - Nov 11, 2025
chevron_left

Related Jobs

View all jobs →

Commenters (This Week)

6 comments
3 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!