Merged
Size
M
Change Breakdown
Feature60%
Config20%
Docs10%
Testing10%
#58276feat(slack): add thread.requireExplicitMention config option

Slack threads gain explicit mention control

Slack threads gain explicit mention control

A new Slack configuration option lets channel operators require explicit @mentions inside threads, silencing the bot when it would otherwise auto-reply to every message in a conversation it joined.

Slack channels that already enforce mention requirements can now apply that same strictness to threads. Previously, once a bot participated in a thread — even after a single explicit @mention — it would treat every subsequent reply in that thread as an implicit mention and auto-respond. For busy team channels where the bot serves as an on-demand assistant, this behavior drowns out human conversation.

The new option (defaulting to false for backward compatibility) suppresses implicit thread mentions entirely. When enabled, the bot only responds to explicit @bot mentions inside threads, regardless of prior participation. Configuration sits under channels.slack.thread, chaining neatly with existing thread options like historyScope and inheritParent.

This change threads the new flag through the Slack monitor context and into the message preparation layer, where it gates the calculation. The implementation is minimal — a single boolean check — but the behavioral impact is significant for multi-agent deployments where bots share channel access.

View Original GitHub Description

Summary

When requireMention: true is set for a Slack channel, replying inside a thread where the bot previously participated bypasses mention gating via implicit mention detection. This causes the bot to respond to every thread message even without an explicit @mention.

This PR adds channels.slack.thread.requireExplicitMention (default: false) which, when set to true, suppresses implicit thread mentions so only explicit @bot mentions trigger replies inside threads.

Configuration

{
  "channels": {
    "slack": {
      "requireMention": true,
      "thread": {
        "requireExplicitMention": true
      }
    }
  }
}

Changes

  • src/config/types.slack.ts: Add requireExplicitMention to SlackThreadConfig
  • src/config/zod-schema.providers-core.ts: Add field to SlackThreadSchema
  • extensions/slack/src/monitor/context.ts: Thread the new option through SlackMonitorContext
  • extensions/slack/src/monitor/provider.ts: Read config and pass to context
  • extensions/slack/src/monitor/message-handler/prepare.ts: Gate implicitMention on the new flag
  • extensions/slack/src/config-ui-hints.ts: Add UI hint
  • docs/channels/slack.md: Document the new option
  • Tests: 3 new test cases covering enabled, disabled, and explicit mention scenarios

Behavior

thread.requireExplicitMentionThread reply without @botThread reply with @bot
false (default)Bot responds (implicit mention)Bot responds
trueBot ignoresBot responds

Closes #34389 Closes #49972

© 2026 · via Gitpulse