Problem or Use Case
By default, once Hermes has participated in a Discord thread (auto-created on @mention or replied in once), it auto-responds to every subsequent message in that thread without needing further @mentions. This is the right default for one-on-one conversations and most channel threads — keeps the conversation flowing without @ clutter.
But it's an active footgun in multi-bot threads. I run a research Discord with multiple AI agents (Hermes, Codex via Codex CLI, Claude via Claude Code, etc.) in shared threads where I address one bot per turn. The current default means: address Codex → Codex fires (good) → Hermes also fires (bad, because the message wasn't for it) → cross-replies, burned credits, and channel spam.
I've hit this personally in active sessions. It's not hypothetical — every multi-bot thread in require_mention=true mode reproduces it.
The current behavior in production code (gateway/platforms/discord.py's _handle_message):
in_bot_thread = is_thread and thread_id in self._threads
if require_mention and not is_free_channel and not in_bot_thread:
if self._client.user not in message.mentions and not mention_prefix:
return # ← thread shortcut bypasses mention check
in_bot_thread = true whenever Hermes has ever participated in the thread, which short-circuits the require_mention gate. There's no way to ask Hermes to stop doing that without disabling require_mention entirely (which would also stop it from responding in shared channels) or never having Hermes participate in shared threads (which defeats the point of using it in a team Discord).
Proposed Solution
Add a discord.thread_require_mention config key (env: DISCORD_THREAD_REQUIRE_MENTION), default false to preserve existing behavior. When true, the in-thread mention shortcut is disabled — threads gate the same way channels do (require explicit @mention).
# config.yaml
discord:
require_mention: true
thread_require_mention: true # multi-bot setup
Explicit @mentions continue to work as expected — this just turns off the implicit "you're in this thread so everything is for you" assumption.
Alternatives Considered
1. Flip the default to thread_require_mention=true. I considered this — Anthropic's Claude Code Discord MCP plugin does require explicit @mention in every channel/thread (no in-thread shortcut at all), which is the more conservative default for shared spaces. But that would change behavior for every existing Hermes Discord deployment, most of which use Hermes 1:1 where the current default is correct and pleasant. The opt-in knob preserves all existing setups.
2. Detect "multi-bot thread" automatically (e.g. if multiple bots have posted recently, require mentions). This adds heuristic complexity for a use case that's well-served by an explicit user choice. Author preference is "expose the knob, don't infer intent" (matching how require_mention, free_response_channels, no_thread_channels already work in this adapter).
3. Disable require_mention entirely and rely on user discipline. Doesn't scale — users will address bots informally ("hey codex") and not always with structured mentions.
Feature Type
Gateway / messaging improvement
Scope
Small (single file, < 50 lines of production code; +30 lines gateway/platforms/discord.py, +1 line hermes_cli/config.py, +2 lines gateway/config.py)
Contribution
(PR ready: [#XXX])
Problem or Use Case
By default, once Hermes has participated in a Discord thread (auto-created on
@mentionor replied in once), it auto-responds to every subsequent message in that thread without needing further@mentions. This is the right default for one-on-one conversations and most channel threads — keeps the conversation flowing without@clutter.But it's an active footgun in multi-bot threads. I run a research Discord with multiple AI agents (Hermes, Codex via Codex CLI, Claude via Claude Code, etc.) in shared threads where I address one bot per turn. The current default means: address Codex → Codex fires (good) → Hermes also fires (bad, because the message wasn't for it) → cross-replies, burned credits, and channel spam.
I've hit this personally in active sessions. It's not hypothetical — every multi-bot thread in
require_mention=truemode reproduces it.The current behavior in production code (
gateway/platforms/discord.py's_handle_message):in_bot_thread = truewhenever Hermes has ever participated in the thread, which short-circuits therequire_mentiongate. There's no way to ask Hermes to stop doing that without disablingrequire_mentionentirely (which would also stop it from responding in shared channels) or never having Hermes participate in shared threads (which defeats the point of using it in a team Discord).Proposed Solution
Add a
discord.thread_require_mentionconfig key (env:DISCORD_THREAD_REQUIRE_MENTION), defaultfalseto preserve existing behavior. Whentrue, the in-thread mention shortcut is disabled — threads gate the same way channels do (require explicit@mention).Explicit
@mentionscontinue to work as expected — this just turns off the implicit "you're in this thread so everything is for you" assumption.Alternatives Considered
1. Flip the default to
thread_require_mention=true. I considered this — Anthropic's Claude Code Discord MCP plugin does require explicit@mentionin every channel/thread (no in-thread shortcut at all), which is the more conservative default for shared spaces. But that would change behavior for every existing Hermes Discord deployment, most of which use Hermes 1:1 where the current default is correct and pleasant. The opt-in knob preserves all existing setups.2. Detect "multi-bot thread" automatically (e.g. if multiple bots have posted recently, require mentions). This adds heuristic complexity for a use case that's well-served by an explicit user choice. Author preference is "expose the knob, don't infer intent" (matching how
require_mention,free_response_channels,no_thread_channelsalready work in this adapter).3. Disable
require_mentionentirely and rely on user discipline. Doesn't scale — users will address bots informally ("hey codex") and not always with structured mentions.Feature Type
Gateway / messaging improvement
Scope
Small (single file, < 50 lines of production code; +30 lines
gateway/platforms/discord.py, +1 linehermes_cli/config.py, +2 linesgateway/config.py)Contribution
(PR ready: [#XXX])