How to fix Antigravity CLI (agy) on WSL broken launcher and missing scripts?

Antigravity opens but does not attach to your WSL folder when you run agy from a Linux terminal. You may also see wslCode.sh: not found or the command is not found at all.

Antigravity agy on WSL opens empty window or shows wslCode.sh not found

When you try to launch Antigravity from a WSL shell with agy ., the app starts with an empty window and does not attach to the current WSL directory. In some cases the command is not found, and after making it callable, you may hit wslCode.sh: not found. The root issues are threefold. The launcher looks for the wrong WSL extension id, the WSL helper scripts are missing from the Antigravity install, and the CLI is not on your WSL PATH by default. For related Antigravity fixes in project loading, you can also see this short guide: project not loading in Antigravity.

Solution Overview

AspectDetail
Root CauseWrong WSL extension id in the Antigravity launcher, missing helper scripts, and CLI not visible in WSL
Primary FixPoint the launcher to google.antigravity-remote-wsl, restore wslCode.sh and wslDownload.sh, and add a WSL symlink for agy
ComplexityMedium
Estimated Time10 to 20 minutes

Fix agy on WSL and attach Antigravity to the current WSL folder

Step-by-Step Solution

Step 1 Make agy callable from WSL 1) Create a symlink to the Windows launcher inside your WSL home Run these commands in your WSL terminal. Replace <USER> with your Windows username.
mkdir -p ~/.local/bin

ln -sf "/mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/bin/antigravity" \
 ~/.local/bin/agy
2) Ensure ~/.local/bin is on your PATH in WSL
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Now agy should be discoverable in WSL. If you run agy . and get an empty Antigravity window, continue with Step 2. For teams exporting code from design tools into Antigravity, this separate fix can help when exports stall: resolve code export issues to Antigravity. Step 2 Update the WSL extension id in the Antigravity launcher Antigravity currently looks for the Microsoft WSL extension id ms-vscode-remote.remote-wsl but ships a Google branded one google.antigravity-remote-wsl. Edit the launcher file to reference the correct id. Option A edit from WSL using sed
sed -i 's/WSL_EXT_ID="ms-vscode-remote.remote-wsl"/WSL_EXT_ID="google.antigravity-remote-wsl"/' \
/mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/bin/antigravity
Option B edit from Windows Notepad 1) Press Win R then run
notepad "C:\Users\<USER>\AppData\Local\Programs\Antigravity\bin\antigravity"
2) Find the line
WSL_EXT_ID="ms-vscode-remote.remote-wsl"
3) Replace it with
WSL_EXT_ID="google.antigravity-remote-wsl"
4) Save the file Try agy . again. If you now see wslCode.sh: not found, continue with Step 3. If you are configuring Stitch with Antigravity and hitting credential issues, see this practical note: fix Stitch MCP API key in Antigravity. Step 3 Restore missing WSL helper scripts Copy wslCode.sh and wslDownload.sh from the VS Code Remote WSL extension into Antigravity’s bundled WSL extension. Option A use Windows PowerShell Run PowerShell as your user and execute
$src = "$env:USERPROFILE\.vscode\extensions\ms-vscode-remote.remote-wsl-0.104.3\scripts"
$dst = "$env:LOCALAPPDATA\Programs\Antigravity\resources\app\extensions\antigravity-remote-wsl\scripts"
New-Item -ItemType Directory -Path $dst -Force | Out-Null
Copy-Item -Path "$src\wslCode.sh","$src\wslDownload.sh" -Destination $dst -Force
Option B use WSL
mkdir -p "/mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/resources/app/extensions/antigravity-remote-wsl/scripts"

cp "/mnt/c/Users/<USER>/.vscode/extensions/ms-vscode-remote.remote-wsl-0.104.3/scripts/wslCode.sh" \
 "/mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/resources/app/extensions/antigravity-remote-wsl/scripts/"

cp "/mnt/c/Users/<USER>/.vscode/extensions/ms-vscode-remote.remote-wsl-0.104.3/scripts/wslDownload.sh" \
 "/mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/resources/app/extensions/antigravity-remote-wsl/scripts/"
Test the result From your WSL terminal, run
cd /path/to/your/project
agy .
Antigravity should open attached to that WSL directory.

Alternative Fixes and Workarounds

Create a wrapper script that avoids editing the installed launcher Instead of changing the vendor file, you can create ~/.local/bin/agy as a small wrapper that sets the correct id and invokes the Windows script. Example template
#!/usr/bin/env bash
export WSL_EXT_ID="google.antigravity-remote-wsl"
/mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/bin/antigravity "$@"
Make it executable
chmod +x ~/.local/bin/agy
This limits the chance of your changes being overwritten by an update. Copy the entire scripts directory from the VS Code WSL extension If other helper files become necessary in future versions, copy the whole scripts folder rather than only two files
cp -r "/mnt/c/Users/<USER>/.vscode/extensions/ms-vscode-remote.remote-wsl-0.104.3/scripts" \
 "/mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/resources/app/extensions/antigravity-remote-wsl/"

Troubleshooting Tips

  • Confirm the symlink target exists
ls -l /mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/bin/antigravity
  • Ensure your shell session has ~/.local/bin on PATH
echo $PATH should include /home/<user>/.local/bin
  • Verify the extension id change persisted
grep WSL_EXT_ID /mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/bin/antigravity
  • Check that the scripts really exist at the destination
ls "/mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/resources/app/extensions/antigravity-remote-wsl/scripts/"
  • Normalize line endings for shell scripts if errors persist
dos2unix on wslCode.sh and wslDownload.sh within WSL
  • Close all Antigravity processes before editing files then retry
  • If your VS Code WSL extension has a different version, adjust the path accordingly
  • Review WSL path and interop behavior in the docs if path translation errors appear
WSL files and file storageRemote WSL extension docs

Best Practices

  • Keep a small script to reapply these changes after Antigravity updates
  • Back up the modified launcher file
– Copy to something like antigravity.bak before editing
  • Prefer a wrapper script in ~/.local/bin to avoid editing vendor files directly
  • Document the exact VS Code WSL extension version used so teammates can match paths
  • Keep WSL PATH configuration in your shell profile to ensure agy remains available

Final Thought

With the launcher id corrected, the helper scripts restored, and agy exposed in WSL, agy . will reliably open Antigravity attached to your current Linux directory. These changes can be scripted and reapplied in minutes after an update, keeping your WSL workflow smooth and consistent.

Leave a Comment