Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006).

# Antigravity Bug Report: Dev Container Forwarder Path Mismatch

## Summary

After updating to Antigravity v1.16.5, Dev Container connections fail with exit code 127 due to incorrect Node.js path being passed to the forwarder script.

## Environment

- **Antigravity Version**: 1.16.5 (commit: 1504c8cc4b34dbfbb4a97ebe954b3da2b5634516)

- **Host OS**: Linux (Ubuntu 24.04, kernel 6.17.0-14-generic)

- **Docker**: 29.2.1

- **Container OS**: Debian 12 (Bookworm)

## Steps to Reproduce

1. Install Antigravity v1.16.5

2. Create a Docker container (any Node.js-based image works)

3. Attempt to connect to the container using “Dev Containers: Attach to Running Container”

## Expected Behavior

Antigravity should successfully connect to the container’s remote extension host.

## Actual Behavior

Connection fails with repeated errors:

```

[Error] forwarder error: handleClient Error: subprocess terminated immediately with return code 127

Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006)

```

## Root Cause Analysis

The forwarder script (`antigravity-dev-containers/scripts/forwarder.js`) receives a `remoteServerNodePath` argument that is **missing the version prefix**.

### Evidence from `ps aux`:

```

/usr/share/antigravity/antigravity …/forwarder.js port maptiler-frontend \

/root/.antigravity-server/bin/1504c8cc4b34dbfbb4a97ebe954b3da2b5634516/node root 42109

                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                               Path received by forwarder (MISSING VERSION)

```

### Actual path inside container:

```bash

$ ls /root/.antigravity-server/bin/

1.16.5-1504c8cc4b34dbfbb4a97ebe954b3da2b5634516/

^^^^^^^

Version prefix exists in actual directory name

```

### Installer script shows correct format:

Looking at the server installation script in the logs:

```bash

SERVER_DIR=“$SERVER_DATA_DIR/bin/$DISTRO_IDE_VERSION-$DISTRO_ID”

# Results in: /root/.antigravity-server/bin/1.16.5-1504c8cc4b34dbfbb4a97ebe954b3da2b5634516

```

The installer uses `$DISTRO_IDE_VERSION-$DISTRO_ID` but the forwarder only receives `$DISTRO_ID`.

## Bug Location

The issue is likely in how the extension passes the `remoteServerNodePath` to the forwarder. The path construction appears to omit `DISTRO_IDE_VERSION` when building the node path for the forwarder arguments.

Relevant file: `/usr/share/antigravity/resources/app/extensions/antigravity-dev-containers/dist/extension.js`

## Workaround

Create a symlink inside the container:

```bash

ln -s /root/.antigravity-server/bin/1.16.5- /root/.antigravity-server/bin/

```

## Suggested Fix

Ensure the forwarder receives the complete path including the version prefix:

```

/root/.antigravity-server/bin/${DISTRO_IDE_VERSION}-${DISTRO_ID}/node

```

instead of:

```

/root/.antigravity-server/bin/${DISTRO_ID}/node

```