feat(discord): add strict mention mode - #16722
Closed
FatPigeorz wants to merge 1 commit into
Closed
Conversation
FatPigeorz
force-pushed
the
fix/discord-thread-bypass-config
branch
from
April 27, 2026 22:22
865ac1c to
f72896c
Compare
Author
|
@teknium1 could you take a quick look when you have a chance? This mirrors the already-merged Slack Summary of intended behavior:
Happy to adjust naming, scope, or tests if you prefer a different shape for the Discord adapter. |
This was referenced May 14, 2026
Contributor
|
Thanks for the focused multi-bot Discord routing work. This is now implemented on current
Automated hermes-sweeper review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
discord.strict_mention/DISCORD_STRICT_MENTIONto mirror Slack's accepted strict-mention patternstrict_mention: false): previously participated threads can continue without repeated mentionsstrict_mention: true, require an explicit Discord bot mention for every server channel/thread message unless the channel is free-responseBackground
Discord already tracked threads where the bot participated and used that state to skip mention checks for follow-up messages. That behavior was unconditional. This PR keeps it as the default for backward compatibility, while adding the same style of opt-in strict mode that Slack added in #16193 after #8019.
This matters for multi-bot / multi-agent Discord servers: explicit mentions should be able to route a turn to one bot without waking another bot just because it participated earlier in the same thread.
Closes #16725
Behavior matrix
strict_mention: false)strict_mention: trueTest Plan
/root/.hermes/hermes-agent/venv/bin/python -m pytest tests/gateway/test_discord_free_response.py tests/gateway/test_config.py tests/gateway/test_discord_thread_persistence.py tests/gateway/test_discord_channel_controls.py -q/root/.hermes/hermes-agent/venv/bin/python -m pytest tests/gateway/test_discord_free_response.py tests/gateway/test_config.py tests/gateway/test_discord_thread_persistence.py tests/gateway/test_discord_channel_controls.py tests/gateway/test_slack_mention.py -q