-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Add requireMention: "strict" mode to disable implicit thread mention bypass #62066
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P3Low-priority cleanup, docs, polish, ergonomics, or speculative work.Low-priority cleanup, docs, polish, ergonomics, or speculative work.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Feature Request
Problem
When
requireMention: trueis set for a Slack channel/account, agents correctly require an explicit@mentionto 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):The core mention gating logic in
resolveMentionGating()treatsimplicitMentionidentically to an explicit mention: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 separatedisableImplicitMention: trueflag) that disables the implicit reply-to-bot thread mention behavior. When enabled:<@botId>app mentions pass the mention gatementionPatternsregex matches pass the mention gateThis could be implemented at multiple levels:
channels.slack.channels."*".requireMention: "strict"channels.slack.accounts.*.requireMention: "strict"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: trueat both channel and account levels does not prevent implicit thread mentions from bypassing the gate.Environment
channels.slack.channels."*".requireMention: true+ per-accountrequireMention: true