Skip to content

ebSocket connections fail in sandbox — DNS bypasses HTTP proxy (EAI_AGAIN) + policy set unimplemented on macOS #557

Closed

Description

@tommyvdm

Description

Attempting to use Slack Socket Mode (WebSocket-based) inside an OpenShell sandbox on macOS. The sandbox has no direct DNS access — all outbound traffic routes through an HTTP proxy at 10.200.0.1:3128. HTTP/HTTPS requests work fine through the proxy, but WebSocket connections (via Node.js ws library) attempt raw DNS lookups that fail with EAI_AGAIN.

Additionally, openshell policy set is unimplemented in v0.0.12, so the only way to set network policies is at sandbox creation time via --policy. The docs at docs.nvidia.com/openshell already document policy set --wait as the official workflow, but it returns "Unimplemented" on the current release.

This blocks any agent that needs WebSocket connectivity (Slack Socket Mode, Discord gateway, etc.) from working inside a sandbox on macOS.

Reproduction Steps

  1. Create a sandbox with a custom policy YAML that includes WebSocket domains (e.g., wss-primary.slack.com:443) for Slack Socket Mode:

openshell sandbox create --name gia --from openshell/sandbox-from:1774058424 --policy /tmp/gia-policy.yaml --forward 18789

  1. Verify the policy is applied correctly:

openshell policy get gia --full

Shows wss-primary.slack.com:443 in the policy ✓

  1. Inside the sandbox, the OpenClaw gateway starts Slack in Socket Mode. The initial HTTP request to
    slack.com/api/apps.connections.open succeeds (routed through the HTTP proxy), but the subsequent WebSocket connection towss-primary.slack.com fails with DNS resolution error:

[ERROR] socket-mode:SlackWebSocket:1 WebSocket error occurred: getaddrinfo EAI_AGAIN wss-primary.slack.com

  1. Confirmed that ALL DNS resolution fails inside the sandbox — not just WebSocket domains. HTTP/HTTPS requests work because they go through the HTTP proxy (which resolves DNS internally), but WebSocket connections from the Node.js ws library bypass the proxy and attempt raw DNS lookups, which fail.

  2. Attempted to hot-reload the policy with protocol: rest and tls: terminate on WebSocket endpoints:

openshell policy set gia --policy /tmp/gia-policy.yaml --wait

This fails with:
Error: status: Unimplemented, message: "", details: [], metadata: MetadataMap { headers: {"date": "...", "content-type":
"application/grpc"} }

  1. Also attempted nemoclaw gia policy-add with the slack preset — same "Unimplemented" error.

Error Logs / Traceback:

openshell policy set fails

$ openshell policy set gia --policy /tmp/gia-policy.yaml --wait
Error: × status: Unimplemented, message: "", details: [], metadata: MetadataMap { headers: {"date": "Sat, 21 Mar 2026 03:14:06
GMT", "content-type": "application/grpc"} }

nemoclaw policy-add fails

$ nemoclaw gia policy-add
Preset to apply: slack
Apply 'slack' to sandbox 'gia'? [Y/n]: y
Error: × status: Unimplemented, message: "", details: [], metadata: MetadataMap { headers: {"date": "Sat, 21 Mar 2026 02:09:00 GMT", "content-type": "application/grpc"} }
Command failed (exit 1): openshell policy set --policy "/var/folders/83/..."

WebSocket DNS failure inside sandbox (repeats every ~25 seconds)

2026-03-21T03:21:26.443+00:00 [ERROR] socket-mode:SlackWebSocket:6 WebSocket error occurred:
getaddrinfo EAI_AGAIN
wss-primary.slack.com
2026-03-21T03:21:26.445+00:00 [ERROR] socket-mode:SocketModeClient:0 WebSocket error! Error: getaddrinfo EAI_AGAIN
wss-primary.slack.com

DNS fails for ALL domains when tested directly (not through HTTP proxy)

$ python3 -c "import socket; print(socket.getaddrinfo('wss-primary.slack.com', 443))"
socket.gaierror: [Errno -3] Temporary failure in name resolution

$ python3 -c "import socket; print(socket.getaddrinfo('slack.com', 443))"
socket.gaierror: [Errno -3] Temporary failure in name resolution

HTTP proxy env vars are set (HTTP requests work fine through proxy)

$ echo $HTTP_PROXY $HTTPS_PROXY $ALL_PROXY
http://10.200.0.1:3128 http://10.200.0.1:3128 http://10.200.0.1:3128

Environment

$ openshell --version
openshell 0.0.12

Platform: macOS Darwin 25.2.0, Apple M4

Sandbox image: openshell/sandbox-from:1774058424 (OpenClaw 2026.3.11)

Environment

Environment

  • openshell: 0.0.12
  • Platform: macOS Darwin 25.2.0, Apple M4 (Mac Mini)
  • Sandbox image: openshell/sandbox-from:1774058424
  • OpenClaw: 2026.3.11
  • NemoClaw: latest (installed via curl installer)

Debug Output

Logs

Checklist

  • I confirmed this bug is reproducible
  • I searched existing issues and this is not a duplicate

Metadata

Metadata

Assignees

Labels

integration: openclawplatform: macos

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions