Skip to content

Slack adapter ignores require_mention: false config for channel messages #6218

@jeffreythepea

Description

@jeffreythepea

Expected behavior

When slack.require_mention: false is set in config.yaml, the bot should respond to all messages in subscribed channels (where message.channels event is subscribed), even without @mention.

Actual behavior

The bot only responds to:

  • Messages with @mention
  • Replies in threads where it was previously mentioned
  • Existing thread sessions

Messages without @mention in non-threaded channels are ignored, even with require_mention: false.

Root cause

In gateway/platforms/slack.py around line 833, the code reads require_mention from self.config as a direct attribute, but it's actually stored in self.config.extra['require_mention'] (see gateway/config.py lines 529-543).

Fix

Change line 834 in gateway/platforms/slack.py from:

require_mention = getattr(self.config, 'require_mention', True)

To:

require_mention = self.config.extra.get('require_mention', True)

Workaround

Patch ~/.hermes/hermes-agent/gateway/platforms/slack.py with the fix above, then restart the gateway.

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