Skip to content

[Ubuntu 24.04][Agent&Skills] OpenClaw Discord bridge stays at awaiting gateway readiness and never answers mentions #13624

Closed

Description

@mercl-lau

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

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

  1. Install NemoClaw v0.0.137 and onboard an OpenClaw sandbox with the default NVIDIA endpoint:

    nemoclaw onboard --agent openclaw --non-interactive
  2. 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
  3. Wait four minutes, then read the bridge log:

    nemoclaw {sandbox} logs | grep -i discord
  4. In Discord, @mention the bot in a guild channel it belongs to and wait two minutes.

  5. 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 opens wss://gateway.discord.gg/?v=10, waits for HELLO, sends IDENTIFY with process.env.DISCORD_BOT_TOKEN and intents 33281, and prints READY or a timeout.

  6. 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

  1. added
    NV QA
    needs: triage
    QA Test Blocker
    on Oct 22, 2026
  2. added theissue type on Oct 22, 2026
  3. added
    area: integrations
    area: messaging
    integration: discord
    integration: openclaw
    and removed
    needs: triage
    on Oct 22, 2026
  4. kaofelix commented on Oct 30, 2026

    @kaofelix
    Collaborator

    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

    Host:          Ubuntu 24.04 aarch64 (Multipass VM on macOS), 4 vCPU, 18 GiB
    NemoClaw:      v0.0.137 (pinned release install, fresh VM)
    OpenShell CLI: openshell 0.0.116
    OpenClaw:      managed image openclaw 2026.9.2
    Inference:     NVIDIA Endpoints, nvidia/nemotron-3.5-super-vl-120b-a12b (default)
    Discord:       one bot, one guild, mention-only, user allowlist
    

    Findings

    1. awaiting gateway readiness is a one-time startup line, not a state.
      @openclaw/discord writes client initialized ...; awaiting gateway readiness once, before the gateway lifecycle starts.
      It writes logged in to discord only 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 ... reconnecting every 15 s.
      That line was absent in my runs and in the report.

    2. The gateway reached READY and delivered messages.
      openclaw channels status --probe in the sandbox reported Discord default: enabled, configured, running, connected ... works.
      An @mention received the 👀 acknowledgement reaction, and the bot sent a typing indicator every 6 s.

    3. 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 posted Request 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.

    4. Ruled out: OpenShell L7 websocket handling and gateway compression.
      Discord did not negotiate permessage-deflate.
      A ws client 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:

    1. When you @mention the bot, does the message get a 👀 reaction or a typing indicator?
      Either one means Discord delivered the message.
    2. Please share unfiltered gateway logs from the time of an @mention, not only lines that match discord.
      Look for [model-fetch], stalled_agent_run, or Request timed out.
    3. Run one agent turn without Discord:
      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:

    • Misleading readiness log: the bridge should log a line when READY arrives after startup.
      Without it, awaiting gateway readiness looks like a permanent state.
    • Silent agent failure in channel status: nemoclaw <sandbox> channels status --channel discord reports [ok] while every agent turn times out.
    • Unretried slash-command deploy: the first gateway socket closed with code 1006 about 0.5 s after startup, and slash-command deployment failed with UND_ERR_SOCKET.
      I saw no retry in that gateway run; the deployment succeeded after a later gateway restart.
      Messages were not affected.
  5. added
    area: observability
    on Oct 30, 2026
  6. hunglp6d commented on Nov 3, 2026

    @hunglp6d
    Collaborator

    The missing-reply behavior was not reproducible on main at 1d20fe89a035a115924b261bb5c3e459affe6683. A real Discord @mention received a reply on DGX Station using the non-Express NVIDIA-hosted installation.

    However, the logs still showed awaiting gateway readiness despite 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

NV QAQA Test Blockerarea: integrationsarea: messagingarea: observabilityintegration: discordintegration: openclaw

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions