Skip to content

Slack require_mention is bypassed in active threads, which breaks multi-agent workflows #8019

@irispillars

Description

@irispillars

Bug Description

slack.require_mention: true does not actually require an explicit mention for follow-up messages inside Slack threads.

Once Hermes has engaged in a thread, the Slack adapter will continue replying to later thread messages even when the message does not mention the bot.

That behavior is highly opinionated and breaks multi-agent workflows in Slack. In a shared thread, I need to be able to address a specific agent explicitly without other agents jumping in just because they previously participated in the thread.

Why This Is a Problem

In multi-agent Slack workflows, thread participation is not the same thing as being addressed.

Current behavior effectively means:

  • mention is required to start a thread interaction
  • mention is not required to continue it

That is the opposite of what many multi-agent workflows need. If multiple agents are present in Slack, a thread should not become an open invitation for every previously-engaged agent to keep responding.

Current Behavior

With slack.require_mention: true, the Slack adapter still processes thread replies without a mention if any of these are true:

  1. reply_to_bot_thread
  2. in_mentioned_thread
  3. has_session

Relevant code path:

  • gateway/platforms/slack.py around the channel gating logic (~lines 1031-1065 in current main)

The adapter explicitly keeps responding when a thread is considered "engaged":

  • bot already replied in the thread
  • bot was mentioned earlier in the thread
  • an existing session exists for the thread

Relevant commits that introduced/expanded this behavior:

  • 4ec615b0feat(gateway): Enable Slack thread replies without explicit @mentions
  • e49c8bbbfeat(slack): thread engagement — auto-respond in bot-started and mentioned threads (#5897)

Current docs also describe this behavior as intentional:

  • website/docs/user-guide/messaging/slack.md
    • once the bot has an active session in a thread, subsequent replies do not require @mention

Expected Behavior

If slack.require_mention: true, Hermes should require an explicit mention for every response-triggering Slack channel/thread message unless the user explicitly enables relaxed thread continuation behavior.

At minimum, this needs to be configurable.

Steps to Reproduce

  1. Configure Hermes with:
    slack:
      require_mention: true
  2. Mention Hermes in a Slack channel thread so it replies once.
  3. Post a follow-up message in the same thread without mentioning Hermes.
  4. Hermes replies anyway.

Actual Behavior

Hermes continues responding in-thread without an explicit mention because thread engagement/session existence bypasses mention gating.

Why require_mention Is Misleading Right Now

A reasonable reading of slack.require_mention: true is:

  • "only respond when explicitly mentioned"

But current behavior is really:

  • "require mention to enter the thread, then auto-follow the rest of the thread"

That semantic mismatch makes the config unsafe/confusing for shared Slack workflows.

Proposed Solution

Please add a config option so Slack thread continuation behavior is explicit instead of hardcoded.

Examples:

  • slack.require_mention_in_threads: true
  • slack.thread_reply_mode: strict|engaged
  • or make require_mention: true apply strictly everywhere, and add a separate opt-in for current behavior

Preferred Outcome

For multi-agent Slack usage, the safest default is:

  • if require_mention is true, require mention in threads too
  • relaxed auto-follow behavior should be opt-in, not implied

Environment

  • Repo: NousResearch/hermes-agent
  • Current local main checked: af9caec4

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/gatewayGateway runner, session dispatch, deliveryplatform/slackSlack app adaptertype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions