Repository navigation
Description
Description
On NemoClaw v0.0.137 an OpenClaw sandbox enrolled for Discord never becomes usable: the managed OpenClaw gateway (image openclaw 2026.9.2) logs discord client initialized as {bot}; awaiting gateway readiness and never logs logged in to discord, so the bot never receives guild events and @mentions are not answered.
The Discord REST side works (the bridge resolves the guild and the bot identity, outbound REST sends succeed), the gateway websocket is opened through the Discord policy preset and keeps exchanging frames at the Discord heartbeat interval, and the bot's session_start_limit shows IDENTIFY is consumed on every sandbox start. The wedge is in the OpenClaw bridge, not in the sandbox network path: a raw gateway client executed inside the same sandbox with the same credential placeholder (routed through the same policy proxy) receives READY in under one second, and the same bot reaches READY in about three seconds from an unrelated host.
- Platform scope: Reproduced on an Ubuntu 24.04 x86_64 GPU host and on DGX Station (aarch64) with the same signature; other platforms not tested.
- Regression: Unknown - v0.0.136 reproduces the identical wedge on the same Ubuntu 24.04 GPU host (same managed OpenClaw image line); releases before v0.0.136 were not tested.
- OpenShell issue: No - the OpenShell network policy admits the gateway websocket and a raw IDENTIFY through it succeeds; the OpenClaw Discord provider inside the managed image never leaves its readiness wait.
Related issues / not a duplicate of
- [all platform]Discord channel repeatedly fails to reach READY (WebSocket 1006 + AggregateError) even when REST/auth succeeds #1738 (closed): Discord channel repeatedly failed to reach READY with websocket close 1006 and AggregateError reconnect loops. Here there is no close and no reconnect loop; the socket stays open and heartbeating while readiness never completes.
- Discord Gateway WebSocket dead on DGX Spark (v0.0.65): config emits a non-loopback per-account proxy that OpenClaw's Discord plugin rejects by design (regression of #3961/#3935 via #4005; cf #5075) #5544 (closed): Discord gateway websocket dead on DGX Spark because of a non-loopback per-account proxy. Here the websocket is established and frames flow through the policy proxy.
- Upstream OpenClaw reports of clients wedged at "awaiting gateway readiness" (Discord gateway reconnect never recovers after transient DNS failure — clients wedge in "awaiting gateway readiness" until full gateway restart openclaw/openclaw#125813, [Bug]: Discord accounts still wedge in READY-wait loop after DNS outage on 2026.9.4 (regression/incomplete fix of #125813) openclaw/openclaw#162189) describe the same bridge state after DNS outages; this report reproduces it at first start with no network fault.
Environment
Device: Ubuntu 24.04 GPU workstation (x86_64, RTX GPU); also DGX Station (aarch64)
OS: Ubuntu 24.04, kernel 6.17.0-23-generic
Architecture: x86_64 (also aarch64 on DGX Station)
Node.js: v22.23.2
npm: 10.9.8
Docker: Docker Engine 29.5.2
OpenShell CLI: openshell 0.0.116
NemoClaw: v0.0.137 (pinned release install)
OpenClaw: managed image openclaw 2026.9.2
Discord bot: one bot, one guild, Message Content Intent enabled, mention-only reply mode, guild allowlist of two user ids
Steps to Reproduce
-
Install NemoClaw v0.0.137 and onboard an OpenClaw sandbox with the default NVIDIA endpoint:
nemoclaw onboard --agent openclaw --non-interactive
-
Enroll Discord non-interactively and apply it:
NEMOCLAW_NON_INTERACTIVE=1 DISCORD_BOT_TOKEN={token} DISCORD_SERVER_ID={guild} DISCORD_REQUIRE_MENTION=1 DISCORD_USER_ID={user ids} nemoclaw {sandbox} channels add discord nemoclaw {sandbox} rebuild --yes -
Wait four minutes, then read the bridge log:
nemoclaw {sandbox} logs | grep -i discord -
In Discord, @mention the bot in a guild channel it belongs to and wait two minutes.
-
Control inside the same sandbox (same credential placeholder, same policy proxy): run a raw gateway client with
nemoclaw {sandbox} exec -- node --input-type=module -e "..."that openswss://gateway.discord.gg/?v=10, waits for HELLO, sends IDENTIFY withprocess.env.DISCORD_BOT_TOKENand intents33281, and prints READY or a timeout. -
Read the bot's IDENTIFY budget from any host:
curl -H "Authorization: Bot {token}" https://discord.com/api/v10/gateway/bot
Expected Result
Step 3 shows logged in to discord as {bot} shortly after client initialized; step 4 gets a reply from the agent in the channel; steps 5 and 6 are consistent with a connected bridge.
Actual Result
Step 3 (identical on Ubuntu 24.04 GPU and DGX Station, four runs):
[gateway] [discord] [default] starting provider
[gateway] [discord] channels resolved: {guild} (guild:{guild name}; aliases:guild:{guild})
[gateway] [discord] [default] Discord bot probe resolved @{bot}
[gateway] [discord] [default] Discord Message Content Intent is limited; bots under 100 servers can use it without verification.
[gateway] [discord] client initialized as {bot id} ({bot}); awaiting gateway readiness
[sandbox] [OCSF ] NET:UPGRADE gateway.discord.gg:443
[sandbox] [OCSF ] NET:OTHER ALLOWED gateway.discord.gg:443 [policy:discord engine:l7-websocket] (repeats every 41.25 s, the Discord heartbeat interval)
No logged in to discord line within 240 s; nothing else is logged by the discord provider.
Step 4: no reply.
Step 5 (inside the same sandbox):
token-placeholder=true len=61
OPEN +222ms
HELLO hb=41250
READY guilds=1 +432ms
Step 6: session_start_limit.remaining decreased by one per sandbox start (983/1000 after the runs above), so the bridge does send IDENTIFY and Discord accepts it.
nemoclaw {sandbox} channels status --channel discord reports registration, policy coverage and configuration all [ok] and "Deep diagnostics: not implemented for discord", so the product gives the user no indication that the bridge is not connected.
Logs
2026-10-22T05:08:21.225+00:00 [gateway] http server listening (15 plugins: anthropic, browser, canvas, cua-computer, device-pair, discord, file-transfer, geolocation, linux-node, memory-core, nemoclaw, ollama, openai, talk-voice, xai; 2.3s)
2026-10-22T05:08:21.729+00:00 [gateway] [discord] [default] starting provider
2026-10-22T05:08:22.444+00:00 [gateway] [discord] channels resolved: {guild} (guild:{guild name}; aliases:guild:{guild})
2026-10-22T05:08:23.287+00:00 [gateway] [discord] [default] Discord bot probe resolved @{bot}
2026-10-22T05:08:23.288+00:00 [gateway] [discord] [default] Discord Message Content Intent is limited; bots under 100 servers can use it without verification.
2026-10-22T05:08:23.319+00:00 [gateway] [discord] client initialized as {bot id} ({bot}); awaiting gateway readiness
[1792645919.286] [sandbox] [OCSF ] [ocsf] NET:OTHER [INFO] ALLOWED gateway.discord.gg:443 [policy:discord engine:l7-websocket]
(no further discord provider lines in the following four minutes)
Activity
kaofelix commentedon Oct 30, 2026
I reproduced the reported log signature on a clean v0.0.137 install. In my run, the Discord gateway was connected. The bot did not reply because the agent turn stalled after Discord delivered the message.
Environment
Findings
awaiting gateway readinessis a one-time startup line, not a state.@openclaw/discordwritesclient initialized ...; awaiting gateway readinessonce, before the gateway lifecycle starts.It writes
logged in to discordonly if READY arrived before that line.A later READY updates the channel status but writes no log line, so this line appears in working setups too.
If READY never arrives, the lifecycle logs
gateway READY wait timed out ... reconnectingevery 15 s.That line was absent in my runs and in the report.
The gateway reached READY and delivered messages.
openclaw channels status --probein the sandbox reportedDiscord default: enabled, configured, running, connected ... works.An @mention received the 👀 acknowledgement reaction, and the bot sent a typing indicator every 6 s.
The agent turn stalled after delivery.
The gateway logged
stalled session ... classification=stalled_agent_run activeWorkKind=model_call.After 600 s, it logged
[model-fetch] error ... elapsedMs=600034 name=TimeoutError, and the bot postedRequest timed out before a response was generated.A CLI turn with no Discord input stalled the same way.
In my setup, the model calls hung because of a network problem specific to my VM.
After I fixed it, the same default model answered in about 1 s and the bot replied in Discord.
I do not expect the reporter's hosts to have this problem, so the cause of their stall is still unknown.
Ruled out: OpenShell L7 websocket handling and gateway compression.
Discord did not negotiate permessage-deflate.
A
wsclient with the bridge's options, connected through the sandbox proxy, received READY in about 640 ms.Request for the reporter
These checks show whether the stall is in Discord or in the agent turn:
Either one means Discord delivered the message.
discord.Look for
[model-fetch],stalled_agent_run, orRequest timed out.nemoclaw <sandbox> exec -- openclaw agent --agent main --session-id repro-1 --message "say hi" --timeout 180.If this turn also fails or times out, Discord is not the cause.
Product follow-ups
My repro surfaced these problems, whatever the reporter's cause turns out to be:
Without it,
awaiting gateway readinesslooks like a permanent state.nemoclaw <sandbox> channels status --channel discordreports[ok]while every agent turn times out.UND_ERR_SOCKET.I saw no retry in that gateway run; the deployment succeeded after a later gateway restart.
Messages were not affected.
hunglp6d commentedon Nov 3, 2026
The missing-reply behavior was not reproducible on
mainat1d20fe89a035a115924b261bb5c3e459affe6683. A real Discord @mention received a reply on DGX Station using the non-Express NVIDIA-hosted installation.However, the logs still showed
awaiting gateway readinessdespite a working connection, and NemoClaw lacked native OpenClaw Discord connectivity diagnostics.PR #14143 addresses that diagnostic gap with native status and post-rebuild checks. It does not establish or fix the original missing-reply cause.
fix(messaging): refresh startup bundle and health tests
fix(ci): align startup bundle pins and Pi receipts
merge: integrate main and document Discord readiness