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: AddrequireExplicitMentiontoSlackThreadConfigsrc/config/zod-schema.providers-core.ts: Add field toSlackThreadSchemaextensions/slack/src/monitor/context.ts: Thread the new option throughSlackMonitorContextextensions/slack/src/monitor/provider.ts: Read config and pass to contextextensions/slack/src/monitor/message-handler/prepare.ts: GateimplicitMentionon the new flagextensions/slack/src/config-ui-hints.ts: Add UI hintdocs/channels/slack.md: Document the new option- Tests: 3 new test cases covering enabled, disabled, and explicit mention scenarios
Behavior
thread.requireExplicitMention | Thread reply without @bot | Thread reply with @bot |
|---|---|---|
false (default) | Bot responds (implicit mention) | Bot responds |
true | Bot ignores | Bot responds |
Closes #34389 Closes #49972