Description
Discord REST calls appear to route through the OpenShell L7 proxy/policy path successfully, but the Discord gateway WebSocket does not become ready.
The original failure was DNS resolution inside the sandbox:
2026-05-20T15:14:57.619+00:00 [discord] gateway error: Error: getaddrinfo EAI_AGAIN gateway.discord.gg
2026-05-20T15:14:57.620+00:00 [discord] gateway error: Error: getaddrinfo EAI_AGAIN gateway.discord.gg
2026-05-20T15:14:57.618+00:00 [discord] client initialized as 1506586841027969204 (NemoAgent); awaiting gateway readiness
**2026-05-20T15:14:57.619+00:00 [discord] gateway error: Error: getaddrinfo EAI_AGAIN gateway.discord.gg
2026-05-20T15:14:57.620+00:00 [discord] gateway error: Error: getaddrinfo EAI_AGAIN gateway.discord.gg**
2026-05-20T15:14:59.455+00:00 [discord] gateway: Gateway websocket closed: 1006
2026-05-20T15:15:12.667+00:00 [discord] gateway was not ready after 15000ms; restarting gateway
2026-05-20T15:15:17.680+00:00 [discord] startup restart waiting on a stale gateway socket for 5000ms; forcing terminate before reconnect
2026-05-20T15:15:18.688+00:00 [discord] [default] channel exited: discord gateway socket did not close within 5000ms before restart
REST traffic to Discord is allowed and visible through sandbox policy logs:
[sandbox] [OCSF ] [ocsf] HTTP:GET [INFO] ALLOWED GET http://discord.com:443/api/users/@me [policy:discord engine:l7]
After configuring Discord proxy support with:
{
"channels": {
"discord": {
"proxy": "http://10.200.0.1:3128"
}
}
}
OpenClaw appeared to read the proxy setting, but rejected it:
2026-05-20T17:02:29.159+00:00 [discord] invalid rest proxy: Error: Proxy URL must target a loopback host
2026-05-20T17:02:30.030+00:00 [discord] invalid gateway proxy: Error: Proxy URL must target a loopback host
2026-05-20T17:02:30.035+00:00 [discord] gateway metadata lookup failed transiently; using default gateway url (Failed to get gateway information from Discord: fetch failed | fetch failed)
2026-05-20T17:02:31.299+00:00 [discord] gateway error: AggregateError @ internalConnectMultiple (node:net:1134:18)
So the current behavior seems to be:
- Discord REST requests can reach discord.com through the OpenShell policy/proxy path.
- Discord gateway WebSocket startup attempts to use gateway.discord.gg.
- Without explicit Discord proxy config, gateway fails with getaddrinfo EAI_AGAIN gateway.discord.gg.
- With channels.discord.proxy = "http://10.200.0.1:3128", OpenClaw rejects the proxy because it is not loopback.
- Gateway then falls back to direct connection and fails with AggregateError @ internalConnectMultiple.
Expected Behavior
Discord gateway WebSocket traffic should route through the intended OpenShell proxy/policy path, the same way Discord REST traffic does.
The Discord policy already includes gateway websocket routing for gateway.discord.gg / *.discord.gg, so the gateway connection should not require direct DNS/socket access from inside the sandbox.
Reproduction Steps
- Start a NemoClaw sandbox with Discord enabled.
- Configure Discord credentials.
- Observe startup logs.
- REST lookup succeeds against discord.com.
- Gateway readiness never completes.
- Observe either:
- getaddrinfo EAI_AGAIN gateway.discord.gg, or
- after adding channels.discord.proxy, Proxy URL must target a loopback host followed by direct connection failure.
Environment
- NemoClaw sandbox using OpenClaw
- OpenClaw version observed inside sandbox:
- Ubuntu/DGX/ NemoClaw 0.0.46
Debug Output
Logs
2026-05-20T15:14:57.618+00:00 [discord] client initialized as 1506586841027969204 (NemoAgent); awaiting gateway readiness
2026-05-20T15:14:57.619+00:00 [discord] gateway error: Error: getaddrinfo EAI_AGAIN gateway.discord.gg
2026-05-20T15:14:57.620+00:00 [discord] gateway error: Error: getaddrinfo EAI_AGAIN gateway.discord.gg
2026-05-20T15:14:59.455+00:00 [discord] gateway: Gateway websocket closed: 1006
2026-05-20T15:14:59.458+00:00 [discord] gateway: Gateway reconnect scheduled in 3752ms (close, resume=false)
2026-05-20T15:15:12.667+00:00 [discord] gateway was not ready after 15000ms; restarting gateway
2026-05-20T15:15:17.680+00:00 [discord] startup restart waiting on a stale gateway socket for 5000ms; forcing terminate before reconnect
2026-05-20T15:15:18.688+00:00 [discord] [default] channel exited: discord gateway socket did not close within 5000ms before restart
[sandbox] [OCSF ] [ocsf] HTTP:GET [INFO] ALLOWED GET http://discord.com:443/api/users/@me [policy:discord engine:l7]
Checklist
Description
Discord REST calls appear to route through the OpenShell L7 proxy/policy path successfully, but the Discord gateway WebSocket does not become ready.
The original failure was DNS resolution inside the sandbox:
2026-05-20T15:14:57.619+00:00 [discord] gateway error: Error: getaddrinfo EAI_AGAIN gateway.discord.gg
2026-05-20T15:14:57.620+00:00 [discord] gateway error: Error: getaddrinfo EAI_AGAIN gateway.discord.gg
After configuring Discord proxy support with:
So the current behavior seems to be:
Expected Behavior
Discord gateway WebSocket traffic should route through the intended OpenShell proxy/policy path, the same way Discord REST traffic does.
The Discord policy already includes gateway websocket routing for gateway.discord.gg / *.discord.gg, so the gateway connection should not require direct DNS/socket access from inside the sandbox.
Reproduction Steps
Environment
Debug Output
Logs
Checklist