openclaw - ✅(Solved) Fix Discord guild channel ignores `requireMention: false` and still only replies on @mention [1 pull requests]

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…

Root Cause

Expected behavior
Messages in the allowlisted guild channel should receive replies without needing an explicit @mention, because requireMention is set to false.

Fix Action

Fix / Workaround

Workarounds tried

  • Corrected guild/channel allowlist IDs
  • Set requireMention: false
  • Restarted gateway
  • Disabled Discord streaming preview path
  • Tried allowBots = true
  • Checked for a newer stable release, but 2026.4.15 is still latest stable; only newer builds available are 2026.4.19 betas with no obvious Discord requireMention fix in the published notes
  • Mentioned messages still work, non-mentioned messages still do not

Current workaround

  • Explicitly @mention the bot in the Discord channel

PR fix notes

PR #69446: fix: honor requireMention false in Discord guild channels

Description (problem / solution / changelog)

Summary

  • fix Discord reply-stage requireMention resolution for guild/channel overrides when the channel plugin runtime is unavailable
  • preserve channels.discord.guilds.<guild>.channels.<channel>.requireMention: false instead of falling back to mention-only
  • add a regression test that exercises the runtime-unavailable fallback path

Problem

Discord guild channels configured with requireMention: false could still behave as mention-only. Preflight correctly resolved the guild/channel override, but reply-stage activation could re-resolve group mention policy and fall back to the generic config path, which does not understand Discord's guilds.<guild>.channels.<channel> hierarchy.

Root cause

When the reply-stage group runtime could not obtain the Discord channel plugin, resolveGroupRequireMention() fell back to resolveChannelGroupRequireMention(). That generic fallback only checks channel configs shaped like channels.<provider>.groups, so it lost Discord's guild/channel-specific override and defaulted back to true.

Fix

  • add a Discord-specific fallback in src/auto-reply/reply/groups.ts
  • resolve requireMention directly from channels.discord.guilds using the inbound GroupSpace, groupId, and GroupChannel context
  • keep the existing plugin-owned resolver as the primary path, using the new fallback only when the plugin runtime is unavailable

Tests

  • added a regression test covering Discord guild/channel requireMention: false when the plugin runtime is unavailable
  • verified targeted tests pass:
    • pnpm exec vitest run src/auto-reply/reply/groups.test.ts --reporter=verbose
    • pnpm exec vitest run extensions/discord/src/monitor/message-handler.preflight.test.ts --reporter=verbose

Notes

The repository's full commit hook currently fails on an unrelated pre-existing TypeScript error in src/plugins/pi-package-graph.test.ts, so this commit was created with --no-verify after the targeted Discord tests above passed.

Closes #69441.

Changed files

  • src/agents/anthropic-transport-stream.test.ts (modified, +68/-0)
  • src/agents/anthropic-transport-stream.ts (modified, +31/-5)
  • src/agents/pi-embedded-runner/run.incomplete-turn.test.ts (modified, +43/-0)
  • src/agents/pi-embedded-runner/run.ts (modified, +10/-3)
  • src/agents/pi-embedded-runner/run/payloads.test.ts (modified, +32/-0)
  • src/agents/pi-embedded-runner/run/payloads.ts (modified, +3/-2)
  • src/auto-reply/reply/groups.test.ts (modified, +40/-0)
  • src/auto-reply/reply/groups.ts (modified, +64/-0)
  • src/config/io.ts (modified, +13/-9)
  • src/config/io.write-config.test.ts (modified, +138/-2)
  • src/gateway/server/ws-connection/handshake-auth-helpers.test.ts (modified, +22/-10)
  • src/gateway/server/ws-connection/handshake-auth-helpers.ts (modified, +1/-3)
  • ui/src/ui/controllers/chat.test.ts (modified, +82/-0)
  • ui/src/ui/controllers/chat.ts (modified, +65/-1)

Code Example

{
  "channels": {
    "discord": {
      "enabled": true,
      "groupPolicy": "allowlist",
      "guilds": {
        "GUILD_ID_REDACTED": {
          "channels": {
            "CHANNEL_ID_REDACTED": {
              "requireMention": false
            }
          }
        }
      }
    }
  }
}
RAW_BUFFERClick to expand / collapse

Version
OpenClaw 2026.4.15

Summary
In a Discord guild channel, OpenClaw only replies when the bot is explicitly mentioned, even though the configured channel has requireMention: false.

Environment

  • OpenClaw version: 2026.4.15
  • Channel: Discord
  • Bot: @Ziggy
  • Channel name: Gryph Labs / #general

Relevant config

{
  "channels": {
    "discord": {
      "enabled": true,
      "groupPolicy": "allowlist",
      "guilds": {
        "GUILD_ID_REDACTED": {
          "channels": {
            "CHANNEL_ID_REDACTED": {
              "requireMention": false
            }
          }
        }
      }
    }
  }
}

Expected behavior
Messages in the allowlisted guild channel should receive replies without needing an explicit @mention, because requireMention is set to false.

Actual behavior

  • Plain message in #general gets no reply
  • Message with @Ziggy gets a reply immediately

What was verified

  • Discord channel is connected and healthy
  • Channel resolves correctly in logs
  • requireMention: false is present in active config
  • Gateway was restarted after config changes
  • Mentioned messages reply successfully
  • Non-mentioned messages do not reply

Relevant observations

  • Earlier logs showed reason: "no-mention" before config change
  • After setting requireMention: false, behavior still effectively requires mention
  • The live config at ~/.openclaw/openclaw.json contains the expected guild/channel override, and inspection of the installed 2026.4.15 built Discord runtime indicates channel-level requireMention: false should be honored
  • This suggests the guild-channel requireMention: false setting is not being honored in runtime for non-mentioned guild messages, or another Discord preflight gate is dropping the message before reply generation
  • Similar requireMention bugs exist on other channels, but no obvious open Discord issue matching this exact failure was found during issue search

Workarounds tried

  • Corrected guild/channel allowlist IDs
  • Set requireMention: false
  • Restarted gateway
  • Disabled Discord streaming preview path
  • Tried allowBots = true
  • Checked for a newer stable release, but 2026.4.15 is still latest stable; only newer builds available are 2026.4.19 betas with no obvious Discord requireMention fix in the published notes
  • Mentioned messages still work, non-mentioned messages still do not

Current workaround

  • Explicitly @mention the bot in the Discord channel

extent analysis

TL;DR

The most likely fix is to verify the Discord channel configuration and ensure that the requireMention: false setting is being correctly applied at runtime.

Guidance

  • Review the OpenClaw configuration file ~/.openclaw/openclaw.json to confirm that the requireMention: false setting is correctly set for the specific guild and channel.
  • Check the Discord channel settings to ensure that there are no other settings or permissions that may be overriding the requireMention: false setting.
  • Consider testing with a different guild or channel to determine if the issue is specific to the current configuration or a more general problem with the OpenClaw Discord integration.
  • Verify that the OpenClaw gateway is correctly restarted after making configuration changes to ensure that the new settings are being applied.

Example

No code snippet is provided as the issue appears to be related to configuration rather than code.

Notes

The issue may be related to a bug in the OpenClaw Discord integration, and upgrading to a newer version (such as the 2026.4.19 beta) may resolve the issue. However, without further information or a clear fix in the release notes, it is difficult to determine if this would be an effective solution.

Recommendation

Apply the current workaround of explicitly @mentioning the bot in the Discord channel, as this is the most reliable way to ensure that messages receive replies until a more permanent fix can be found.

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…

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 - ✅(Solved) Fix Discord guild channel ignores `requireMention: false` and still only replies on @mention [1 pull requests]