I was really frustrated with this issue, too. I spent the better part of the last 2 days trying to find the problem
Had Gemini to summarise the bug, cause and a potential hack until Google fixes this properly
Have still not managed to get Docker in Docker working, though
Hope it helps some of you.
Summary
Antigravity version 1.16.5 fails to connect to dev containers with
forwardSocket/forwardPortsubprocess exit code 127 (“command not found”). The root cause is a path mismatch in thegetRemoteServerNodePathfunction.
Environment
-
Antigravity Version: 1.16.5 (commit
1504c8cc4b34dbfbb4a97ebe954b3da2b5634516) -
OS: macOS (also likely affects Linux)
-
Container: Debian-based devcontainer (aarch64)
Symptoms
forwarder error: handleClient Error: subprocess terminated immediately with return code 127
WebSocket close with status code 1006
Root Cause
The getRemoteServerNodePath function in antigravity-dev-containers extension constructs an incorrect path to the remote node binary.
The Bug
Location:
antigravity-dev-containers/dist/extension.js→getRemoteServerNodePath()
// Buggy code (deobfuscated):
getRemoteServerNodePath(output) {
const parsed = this.getRemoteServerHomeAndCommitHash(output);
return `${parsed.serverHome}/bin/${parsed.commitHash}/node`;
// ^^^^^^^^^^^^^^^^^^
// Missing ideVersion prefix!
}
Expected path: /home/user/.antigravity-server/bin/1.16.5-{commitHash}/node
Actual path constructed: /home/user/.antigravity-server/bin/{commitHash}/node
The server installation script (generateBashInstallScript) installs to:
SERVER_DIR="$SERVER_DATA_DIR/bin/$DISTRO_IDE_VERSION-$DISTRO_ID"
# e.g., .antigravity-server/bin/1.16.5-1504c8cc4b34.../
But getRemoteServerNodePath omits the $DISTRO_IDE_VERSION- prefix when reconstructing the path.
Verification
#Path WITHOUT version prefix - DOES NOT EXIST
docker exec <container> test -f ~/.antigravity-server/bin/1504c8cc4b34.../node
# Result: NOT FOUND
# Path WITH version prefix - EXISTS
docker exec <container> test -f ~/.antigravity-server/bin/1.16.5-1504c8cc4b34.../node
# Result: EXISTS
Suggested Fix
Update getRemoteServerNodePath to include the IDE version in the path:
getRemoteServerNodePath(output) {
const parsed = this.getRemoteServerHomeAndCommitHash(output);
if (!parsed) return null;
// Fix: Include ideVersion prefix in path
return `${parsed.serverHome}/bin/${parsed.ideVersion}-${parsed.commitHash}/node`;
}
getRemoteServerHomeAndCommitHash(output) {
// Update regex to capture ideVersion as well
const match = output.match(/logFile==(.+?\/\.[^\/]+)\/\.([a-f0-9]{40}(?:-dev)?)\.log==/);
if (!match) return null;
// Also parse ideVersion from the output
const ideVersionMatch = output.match(/ideVersion==([^=]+)==/);
return {
serverHome: match[1],
commitHash: match[2],
ideVersion: ideVersionMatch ? ideVersionMatch[1] : this.getIdeVersion()
};
}
Workaround
Add this to your devcontainer’s
postCreate command to create symlinks:
# Antigravity server symlink workaround
# Bug: Antigravity looks for node at .../bin/{commit}/node
# but server installs to .../bin/{version}-{commit}/node
(
SERVER_DIR="$HOME/.antigravity-server/bin"
mkdir -p "$SERVER_DIR"
while true; do
for dir in "$SERVER_DIR"/*-*; do
if [ -d "$dir" ]; then
dirname=$(basename "$dir")
commit="${dirname#*-}"
symlink="$SERVER_DIR/$commit"
if [ ! -e "$symlink" ]; then
ln -s "$dir" "$symlink" 2>/dev/null &&
echo "Antigravity workaround: Created symlink $commit -> $dirname"
fi
fi
done
sleep 5
done
) >/dev/null 2>&1 &
For an existing container, run manually:
docker exec -u <user> <container> ln -s \
~/.antigravity-server/bin/1.16.5-<commit> \
~/.antigravity-server/bin/<commit>
Discovered on 2026-02-06. Affects Antigravity 1.16.5. Previous versions may not be affected if they used a different path structure.