Table Of Content
- How to fix Antigravity CLI (agy) on WSL broken launcher and missing scripts?
- Solution Overview
- How to fix Antigravity CLI (agy) on WSL broken launcher and missing scripts?
- Step-by-Step Solution
- (Optional) ensure executable perms if accessed via WSL:
- Alternative Fixes & Workarounds
- Troubleshooting Tips
- Best Practices
- Final Thought

How to fix Antigravity CLI (agy) on WSL broken launcher and missing scripts?
Table Of Content
- How to fix Antigravity CLI (agy) on WSL broken launcher and missing scripts?
- Solution Overview
- How to fix Antigravity CLI (agy) on WSL broken launcher and missing scripts?
- Step-by-Step Solution
- (Optional) ensure executable perms if accessed via WSL:
- Alternative Fixes & Workarounds
- Troubleshooting Tips
- Best Practices
- Final Thought
Antigravity’s agy CLI fails to open WSL folders like code . does for VS Code. You may see an empty Antigravity window, or errors such as “wslCode.sh: not found.”
How to fix Antigravity CLI (agy) on WSL broken launcher and missing scripts?
Your WSL shell can’t find agy, or when it does, running agy . opens Antigravity but it’s not attached to the WSL folder. In many cases you’ll also get “wslCode.sh: not found.” These symptoms come from a broken launcher config and missing helper scripts in the Windows installer.
![Antigravity WSL CLI issue]
Solution Overview
| Aspect | Detail |
|---|---|
| Root Cause | Wrong WSL extension ID in Antigravity’s launcher and missing WSL helper scripts in the bundled extension |
| Primary Fix | Create a WSL symlink for agy, correct the launcher’s WSL extension ID, and restore missing wslCode.sh/wslDownload.sh |
| Complexity | Medium |
| Estimated Time | 10–20 minutes |
If you’re also encountering unrelated launch issues like the “1024 tokens not thinking” message, check this targeted fix: troubleshoot the 1024 token error.
How to fix Antigravity CLI (agy) on WSL broken launcher and missing scripts?
Step-by-Step Solution
1) Make agy callable from WSL (symlink)
- Goal: WSL should find agy on PATH and point it to the Windows launcher.
Run in your WSL shell (replace USER with your Windows username):
mkdir -p ~/.local/bin
ln -sf "/mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/bin/antigravity" \
~/.local/bin/agyEnsure ~/.local/bin is on PATH (add to ~/.bashrc or ~/.zshrc if needed):
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcTest:
which agy
agy --version![WSL symlink setup]
2) Fix the WSL extension ID in the Antigravity launcher
- Problem: The launcher searches for the Microsoft extension ID but Antigravity bundles a Google-branded one.
- File to edit (Windows path): C:\Users\USER\AppData\Local\Programs\Antigravity\bin\antigravity
Two safe ways to update:
Option A — Edit from Windows (Notepad):
- Open the file above and change:
- WSL_EXT_ID="ms-vscode-remote.remote-wsl"
- WSL_EXT_ID="google.antigravity-remote-wsl"
- Save.
Option B — Edit from WSL with 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"Verify the line now reads:
WSL_EXT_ID="google.antigravity-remote-wsl"3) Restore missing WSL helper scripts (wslCode.sh, wslDownload.sh)
- Problem: Antigravity’s WSL extension folder is missing scripts that the launcher expects.
- Copy from the VS Code Remote WSL extension (adjust version if different):
Source:
%USERPROFILE%.vscode\extensions\ms-vscode-remote.remote-wsl-0.104.3\scripts
Destination: C:\Users\USER\AppData\Local\Programs\Antigravity\resources\app\extensions\antigravity-remote-wsl\scripts\
Option A — Copy via PowerShell (Windows):
$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 -Force -Path $dst | Out-Null
Copy-Item -Path "$src\wslCode.sh","$src\wslDownload.sh" -Destination $dst -ForceOption B — Copy from WSL:
SRC="/mnt/c/Users/<USER>/.vscode/extensions/ms-vscode-remote.remote-wsl-0.104.3/scripts"
DST="/mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/resources/app/extensions/antigravity-remote-wsl/scripts"
mkdir -p "$DST"
cp -f "$SRC/wslCode.sh" "$DST/"
cp -f "$SRC/wslDownload.sh" "$DST/"
# (Optional) ensure executable perms if accessed via WSL:
chmod +x "$DST/wslCode.sh" "$DST/wslDownload.sh"Test the end-to-end flow from your project directory in WSL:
cd ~/your/project
agy .You should get an Antigravity window attached to that WSL folder, similar to code ..
If you run into an “account not eligible” block during sign-in, see this quick help: fix account not eligible in Antigravity.
Alternative Fixes & Workarounds
A) Open Windows path to WSL folder directly
- From Windows (PowerShell), launch Antigravity with the UNC path:
& "$env:LOCALAPPDATA\Programs\Antigravity\Antigravity.exe" "\\wsl$\Ubuntu\home\<user>\your\project"- Replace Ubuntu with your distro name (run wsl -l).
Effectiveness: Medium. Works but lacks the convenience of agy . inside WSL.
B) Reinstall or update the VS Code Remote WSL extension first
- Ensure the source scripts exist by installing VS Code + Remote WSL extension:
- VS Code Remote - WSL
- Then repeat Step 3 to copy scripts.
Effectiveness: Low to Medium. Only helps provide missing scripts; you still must fix the Antigravity launcher’s extension ID.
C) Quick launch without symlink
- From WSL, run Antigravity directly:
"/mnt/c/Users/<USER>/AppData/Local/Programs/Antigravity/bin/antigravity" .Effectiveness: Medium. Good for one-off use; symlink is better for daily work.
Troubleshooting Tips
- Confirm agy resolves and points to Windows launcher:
- which agy
- file ~/.local/bin/agy
- Validate the extension ID line:
- grep WSL_EXT_ID "/mnt/c/Users/USER/AppData/Local/Programs/Antigravity/bin/antigravity"
- Expected: WSL_EXT_ID="google.antigravity-remote-wsl"
- Check scripts exist:
- ls "/mnt/c/Users/USER/AppData/Local/Programs/Antigravity/resources/app/extensions/antigravity-remote-wsl/scripts/"
- Ensure wslCode.sh and wslDownload.sh are present and executable.
- Confirm WSL distro name in UNC path:
- wsl -l
- Match in paths like \wsl$\Ubuntu...
- Re-run Antigravity with more logging (if supported) or collect logs from the launcher output by running:
- agy --verbose .
- Antivirus exclusions
- If copies are blocked, temporarily allow the Antigravity install folder.
- Extension version drift
- The VS Code extension version may differ (e.g., 0.104.x). Use the highest version you have under %USERPROFILE%.vscode\extensions\ms-vscode-remote.remote-wsl-*/scripts.
If you’re seeing frequent worker crashes after launch, this guide helps: resolve agent terminated errors.
Best Practices
- Keep a repair script to reapply after Antigravity updates overwrite changes. Example (WSL):
#!/usr/bin/env bash
set -euo pipefail
USER="<USER>"
BIN="/mnt/c/Users/$USER/AppData/Local/Programs/Antigravity/bin/antigravity"
EXT_DST="/mnt/c/Users/$USER/AppData/Local/Programs/Antigravity/resources/app/extensions/antigravity-remote-wsl/scripts"
EXT_SRC="/mnt/c/Users/$USER/.vscode/extensions/$(ls -1 /mnt/c/Users/$USER/.vscode/extensions | grep ms-vscode-remote.remote-wsl | sort -V | tail -n1)/scripts"
mkdir -p ~/.local/bin
ln -sf "$BIN" ~/.local/bin/agy
sed -i 's/WSL_EXT_ID="ms-vscode-remote.remote-wsl"/WSL_EXT_ID="google.antigravity-remote-wsl"/' "$BIN"
mkdir -p "$EXT_DST"
cp -f "$EXT_SRC/wslCode.sh" "$EXT_DST/"
cp -f "$EXT_SRC/wslDownload.sh" "$EXT_DST/"
chmod +x "$EXT_DST/"*.sh
echo "agy WSL repair complete."- Back up modified files before updates.
- Keep ~/.local/bin on PATH for all shells.
- Track your WSL distro name and ensure paths match.
- Regularly update VS Code Remote WSL so source scripts remain available.
Final Thought
With the symlink, corrected extension ID, and restored helper scripts, agy . works from WSL exactly as you’d expect. Keep the quick repair script handy for future Antigravity updates, and you’ll stay productive with WSL-based projects.
External references:
- Microsoft WSL docs: WSL Overview
- VS Code Remote - WSL: Extension page
Subscribe to our newsletter
Get the latest updates and articles directly in your inbox.
Related Posts

How to fix Antigravity model list disappeared and stuck on loading models?
How to fix Antigravity model list disappeared and stuck on loading models?

How to fix Claude Opus 4.6 support issues in Antigravity?
How to fix Claude Opus 4.6 support issues in Antigravity?

How to fix Antigravity login issue: Your current account is not eligible?
How to fix Antigravity login issue: Your current account is not eligible?

