openclaw - 💡(How to fix) Fix Discord bot connects but never receives MESSAGE_CREATE events; only slash interactions route through (regression after 2026.5.x) [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#77910Fetched 2026-05-06 06:19:28
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
2
Timeline (top)
commented ×2labeled ×2closed ×1

After a config reload on 2026-05-03 ~19:24 EDT, the Discord bot stopped routing plain text messages and @mentions to any agent lane. The bot stays connected and slash commands work, but MESSAGE_CREATE events are never delivered to the gateway's message handler.

Error Message

  • gateway.err.log previously showed: [discord] gateway error: Error: Gateway heartbeat ACK timeout (one occurrence post-restart); [fetch-timeout] fetch timeout after 2500ms ... url=https://discord.com/api/v10/users/@me (one occurrence post-restart); repeated [diagnostic] long-running session errors from a stuck mistral-agent session (killed by restart).

Root Cause

Hypothesis: The gateway's GUILD_MESSAGE_CREATE event subscription/listener is never attached (or never fires) after a config reload in 2026.5.x. Slash-interaction dispatch works because it uses the separate interactions endpoint. The 2026.5.3-1 fix that re-added the discord plugin payload didn't restore the listener registration.

Fix Action

Fix / Workaround

  • No action:"new" entries in commands.log since 2026-05-03T10:38:03; plain text messages and @mentions are completely silently dropped.
  • openclaw channels status --probe reports Discord as connected, intents:content=limited, works, audit ok.
  • Slash commands (/status, /healthcheck) work and the bot replies ephemerally.
  • The lifecycle log shows [discord] client initialized as <ID>; awaiting gateway readiness but no corresponding "ready" event ever appears.
  • openclaw channels resolve --channel discord 1484462456066670768 correctly resolves to opus-agent.
  • Direct CLI invocation (openclaw agent --agent opus-agent --message "ping") works fine.
  • Other agents (gemini, minimax, etc.) process turns from heartbeat/cron triggers; OpenRouter billing errors are visible in gateway.err.log, so the dispatch path is alive.
  • gateway.err.log previously showed: [discord] gateway error: Error: Gateway heartbeat ACK timeout (one occurrence post-restart); [fetch-timeout] fetch timeout after 2500ms ... url=https://discord.com/api/v10/users/@me (one occurrence post-restart); repeated [diagnostic] long-running session errors from a stuck mistral-agent session (killed by restart).
  • The 2026.5.3-1 update noted @openclaw/discord and @openclaw/brave-plugin were missing from ~/.openclaw/npm/node_modules/ and were freshly installed, but message-event delivery was still not restored after update + restart.

Affected: Single guild Discord bot, ~30 agent channels, all message-based routing Severity: High — blocks all plain text and @mention routing to agents since 2026-05-03 Frequency: 100% reproducible after the config reload; persists through daemon restarts, full Mac reboot, token rotation, and upgrade to 2026.5.3-1 Consequence: All Discord message-based agent interactions silently fail; only slash commands and direct CLI invocations work

Hypothesis: The gateway's GUILD_MESSAGE_CREATE event subscription/listener is never attached (or never fires) after a config reload in 2026.5.x. Slash-interaction dispatch works because it uses the separate interactions endpoint. The 2026.5.3-1 fix that re-added the discord plugin payload didn't restore the listener registration.

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After a config reload on 2026-05-03 ~19:24 EDT, the Discord bot stopped routing plain text messages and @mentions to any agent lane. The bot stays connected and slash commands work, but MESSAGE_CREATE events are never delivered to the gateway's message handler.

Steps to reproduce

  1. Run OpenClaw 2026.5.3-1 (or 2026.5.2) with a Discord channel configured (single guild, single bot, ~30 channels routed to per-agent lanes).
  2. Trigger a config reload that modifies plugins.installs.discord and related Discord keys.
  3. After reload, send a plain text message in a dedicated agent channel (e.g., channel ID 1484462456066670768 mapped to opus-agent).
  4. Observe that no entry appears in commands.log and the agent does not respond.
  5. Also attempt an @mention in any channel — no commands.log entry is created.
  6. Run openclaw channels status --probe — Discord shows as connected, intents:content=limited, audit ok.
  7. Verify slash commands (/status, /healthcheck) still work ephemerally.
  8. Run openclaw agent --agent opus-agent --message "ping" directly — agent responds correctly.

Expected behavior

Plain text messages sent in dedicated agent channels (requireMention: false, enabled: true) should create action:"new" entries in commands.log and trigger agent responses, as they did before 2026-05-03T10:38:03 (last known-good commands.log entry).

Actual behavior

  • No action:"new" entries in commands.log since 2026-05-03T10:38:03; plain text messages and @mentions are completely silently dropped.
  • openclaw channels status --probe reports Discord as connected, intents:content=limited, works, audit ok.
  • Slash commands (/status, /healthcheck) work and the bot replies ephemerally.
  • The lifecycle log shows [discord] client initialized as <ID>; awaiting gateway readiness but no corresponding "ready" event ever appears.
  • openclaw channels resolve --channel discord 1484462456066670768 correctly resolves to opus-agent.
  • Direct CLI invocation (openclaw agent --agent opus-agent --message "ping") works fine.
  • Other agents (gemini, minimax, etc.) process turns from heartbeat/cron triggers; OpenRouter billing errors are visible in gateway.err.log, so the dispatch path is alive.
  • gateway.err.log previously showed: [discord] gateway error: Error: Gateway heartbeat ACK timeout (one occurrence post-restart); [fetch-timeout] fetch timeout after 2500ms ... url=https://discord.com/api/v10/users/@me (one occurrence post-restart); repeated [diagnostic] long-running session errors from a stuck mistral-agent session (killed by restart).
  • The 2026.5.3-1 update noted @openclaw/discord and @openclaw/brave-plugin were missing from ~/.openclaw/npm/node_modules/ and were freshly installed, but message-event delivery was still not restored after update + restart.

OpenClaw version

2026.5.3-1 (also reproduced on 2026.5.2)

Operating system

macOS, launchd-managed gateway (gui/501/ai.openclaw.gateway)

Install method

launchd-managed mac app (gui/501/ai.openclaw.gateway)

Model

openrouter/anthropic/claude-opus-4 (cost-capped, via opus-agent)

Provider / routing chain

Discord WS gateway -> openclaw gateway (launchd) -> OpenRouter -> anthropic/claude-opus-4

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Affected: Single guild Discord bot, ~30 agent channels, all message-based routing Severity: High — blocks all plain text and @mention routing to agents since 2026-05-03 Frequency: 100% reproducible after the config reload; persists through daemon restarts, full Mac reboot, token rotation, and upgrade to 2026.5.3-1 Consequence: All Discord message-based agent interactions silently fail; only slash commands and direct CLI invocations work

Additional information

Hypothesis: The gateway's GUILD_MESSAGE_CREATE event subscription/listener is never attached (or never fires) after a config reload in 2026.5.x. Slash-interaction dispatch works because it uses the separate interactions endpoint. The 2026.5.3-1 fix that re-added the discord plugin payload didn't restore the listener registration.

Config reload keys touched on 2026-05-03: plugins.installs.discord, plugins.installs.brave, plugins.entries.brave, plugins.entries.memory-lancedb, plugins.allow, skills.entries, plus a few others.

Attempted fixes (none worked):

  1. openclaw daemon restart (multiple times)
  2. Full Mac reboot
  3. Bot token rotation in Developer Portal + openclaw channels add --channel discord --token <new>
  4. Confirmed all Privileged Gateway Intents (Presence, Server Members, Message Content) toggled ON in Discord Developer Portal
  5. openclaw doctor --fix
  6. Update from 2026.5.2 → 2026.5.3-1 with fresh @openclaw/discord plugin install
  7. Verified openclaw.json channels.discord.guilds.<guildId>.channels has channel ID with enabled: true, requireMention: false
  8. Verified bindings[] maps channel ID → opus-agent
  9. Verified agents.list[] contains opus-agent with correct agentDir and model
  10. Verified main.subagents.allowAgents includes opus-agent

Workaround in use: openclaw agent --agent <id> --message "..." from CLI, and Discord slash commands.

Files available: ~/.openclaw/openclaw.json (+ .bak.* rotation), ~/.openclaw/logs/gateway.log, gateway.err.log, commands.log (last entry 2026-05-03T10:38), config-audit.jsonl, AGENT-AUDIT-MATRIX-2026-05-05.json

extent analysis

TL;DR

The Discord bot's message routing issue may be resolved by re-registering the GUILD_MESSAGE_CREATE event listener after a config reload.

Guidance

  • Verify that the plugins.installs.discord config is correctly set up and the Discord plugin is properly installed and loaded after the config reload.
  • Check the gateway logs for any errors related to event listener registration or Discord API connectivity issues.
  • Attempt to manually register the GUILD_MESSAGE_CREATE event listener using the Discord API or the OpenClaw API (if available).
  • Review the OpenClaw configuration files (e.g., openclaw.json) to ensure that the Discord channel settings are correctly configured, including the enabled and requireMention flags.

Example

No code snippet is provided as the issue seems to be related to configuration and event listener registration.

Notes

The issue may be related to a change in the Discord API or the OpenClaw plugin, which is causing the event listener to not be registered correctly after a config reload. Further investigation and debugging may be required to determine the root cause.

Recommendation

Apply a workaround by manually registering the GUILD_MESSAGE_CREATE event listener or by using the openclaw agent CLI command to send messages to agents until a permanent fix is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Plain text messages sent in dedicated agent channels (requireMention: false, enabled: true) should create action:"new" entries in commands.log and trigger agent responses, as they did before 2026-05-03T10:38:03 (last known-good commands.log entry).

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Discord bot connects but never receives MESSAGE_CREATE events; only slash interactions route through (regression after 2026.5.x) [2 comments, 3 participants]