openclaw - 💡(How to fix) Fix Add requireMention: "strict" mode to disable implicit thread mention bypass [1 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#62066Fetched 2026-04-08 03:09:30
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Root Cause

When requireMention: true is set for a Slack channel/account, agents correctly require an explicit @mention to respond in group channels. However, once an agent replies in a Slack thread, every subsequent message in that thread bypasses the mention gate because OpenClaw treats all thread messages as "implicit reply-to-bot" mentions.

Fix Action

Workaround

Currently there is no workaround. Setting requireMention: true at both channel and account levels does not prevent implicit thread mentions from bypassing the gate.

Code Example

const effectiveWasMentioned = params.wasMentioned || implicit || bypass;
RAW_BUFFERClick to expand / collapse

Feature Request

Problem

When requireMention: true is set for a Slack channel/account, agents correctly require an explicit @mention to respond in group channels. However, once an agent replies in a Slack thread, every subsequent message in that thread bypasses the mention gate because OpenClaw treats all thread messages as "implicit reply-to-bot" mentions.

This is documented behavior (from docs/channels/groups.md):

Replying to a bot message counts as an implicit mention (when the channel supports reply metadata).

The core mention gating logic in resolveMentionGating() treats implicitMention identically to an explicit mention:

const effectiveWasMentioned = params.wasMentioned || implicit || bypass;

In multi-agent setups (e.g., 3 Slack bots in the same workspace), this causes all agents that have previously replied in a thread to respond to every new message, even when only one agent (or none) was tagged. The user loses control over which agent speaks.

Expected Behavior

When a strict mention mode is enabled, agents should only respond to messages where they are explicitly @mentioned, regardless of whether they previously participated in the thread.

Proposed Solution

Add a requireMention: "strict" mode (or a separate disableImplicitMention: true flag) that disables the implicit reply-to-bot thread mention behavior. When enabled:

  • Only explicit <@botId> app mentions pass the mention gate
  • Only configured mentionPatterns regex matches pass the mention gate
  • Replying in a thread where the bot previously responded does not count as a mention

This could be implemented at multiple levels:

  • Per-channel: channels.slack.channels."*".requireMention: "strict"
  • Per-account: channels.slack.accounts.*.requireMention: "strict"
  • Global: messages.groupChat.requireMention: "strict"

Affected Channels

This applies to all channels that support implicit reply-to-bot mentions: Slack, Telegram, WhatsApp, Discord, and Microsoft Teams.

Workaround

Currently there is no workaround. Setting requireMention: true at both channel and account levels does not prevent implicit thread mentions from bypassing the gate.

Environment

  • OpenClaw version: 2026.4.5
  • Channel: Slack (socket mode, multi-account)
  • Config: channels.slack.channels."*".requireMention: true + per-account requireMention: true

extent analysis

TL;DR

Implement a "strict" mention mode by adding a requireMention: "strict" configuration option to disable implicit reply-to-bot thread mentions.

Guidance

  • Identify the channels and accounts where the strict mention mode is required and apply the requireMention: "strict" configuration option accordingly.
  • Verify that the new configuration option correctly blocks implicit mentions in threads by testing with multiple agents and users.
  • Consider implementing the strict mention mode at different levels (per-channel, per-account, or global) to provide flexibility in configuration.
  • Review the affected channels (Slack, Telegram, WhatsApp, Discord, and Microsoft Teams) to ensure the new configuration option works as expected across all platforms.

Example

// Example configuration for a Slack channel
channels.slack.channels."*".requireMention: "strict"

// Example configuration for a Slack account
channels.slack.accounts.*.requireMention: "strict"

Notes

The proposed solution requires updates to the OpenClaw configuration and possibly the core mention gating logic. The requireMention: "strict" mode should be thoroughly tested to ensure it works correctly in different scenarios and across all affected channels.

Recommendation

Apply the workaround by implementing the requireMention: "strict" configuration option, as it provides a clear and explicit way to disable implicit reply-to-bot thread mentions and ensure that agents only respond to explicit mentions.

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 - 💡(How to fix) Fix Add requireMention: "strict" mode to disable implicit thread mention bypass [1 participants]