Skip to content

Fix Slack mention gating and workspace routing#13455

Closed
0xchloe996 wants to merge 2 commits into
NousResearch:mainfrom
0xchloe996:fix/slack-gating-and-reactions
Closed

Fix Slack mention gating and workspace routing#13455
0xchloe996 wants to merge 2 commits into
NousResearch:mainfrom
0xchloe996:fix/slack-gating-and-reactions

Conversation

@0xchloe996

@0xchloe996 0xchloe996 commented Apr 21, 2026

Copy link
Copy Markdown

Summary

  • require explicit @mentions for Slack messages in public channels instead of auto-continuing thread/session replies
  • apply SLACK_ALLOWED_USERS only to Slack DMs so allowed channels can respond to any user who mentions the bot
  • resolve Slack workspace/team IDs from the Socket Mode envelope body so replies use the correct workspace client and avoid channel_not_found

Testing

  • /Users/onekey/.hermes/hermes-agent/venv/bin/python -m pytest /Users/onekey/.hermes/hermes-agent/tests/gateway/test_slack.py /Users/onekey/.hermes/hermes-agent/tests/gateway/test_slack_mention.py /Users/onekey/.hermes/hermes-agent/tests/gateway/test_unauthorized_dm_behavior.py -q

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists platform/slack Slack app adapter comp/gateway Gateway runner, session dispatch, delivery labels Apr 22, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Closing in favor of the narrower salvage in #16193.

Your PR solved a real problem (thread auto-engagement in multi-agent scenarios), but the scope made it hard to merge as-is: +414/-136 across 10 files changed the default behavior in public channels and mixed in unrelated workspace-routing and allowed_users changes. The mention-gating piece is superseded by #16193's opt-in slack.strict_mention config (default off, backward-compatible) which reaches the same result for agents that need strict mode.

If you want the workspace routing / Socket Mode envelope team_id fix to land, please open a focused PR for just that piece — the code looked right, it was just coupled to the larger diff. Thanks for the contribution!

@teknium1 teknium1 closed this Apr 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists platform/slack Slack app adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants