hermes - 💡(How to fix) Fix feat: Slack adapter — add channel/DM history read scopes and message.channels event subscription

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  1. hermes gateway setup — update the Slack setup wizard to display the required scopes checklist and warn if the token's granted scopes are missing any of the above (using auth.test + apps.permissions.info or parsing the x-oauth-scopes header).

Fix Action

Fix / Workaround

Workaround (Today)

Code Example

curl -s "https://slack.com/api/conversations.history?channel=C0AFX21T06R&limit=10"   -H "Authorization: Bearer $SLACK_BOT_TOKEN" | jq .messages
RAW_BUFFERClick to expand / collapse

Problem

The Slack gateway adapter currently only supports receiving messages directed at the bot (DMs + explicit @mentions). It cannot read channel history or fetch messages by link/timestamp. This makes it impossible for Hermes to:

  • Read a Slack thread when a user drops a slack:// link in chat
  • Retrieve historical context from a channel on demand
  • Process messages in public/private channels the bot is a member of

The troubleshooting note in the skill already documents the symptom:

Slack bot only works in DMs: Must subscribe to message.channels event. Without it, the bot ignores public channels.

But even subscribing to the event doesn't grant the bot permission to fetch history via the API — that requires additional OAuth scopes.


Required OAuth Bot Token Scopes

ScopeGrants
channels:historyRead messages + files in public channels the bot is a member of
groups:historyRead messages + files in private channels the bot is a member of
im:historyRead messages in direct messages (1:1)
mpim:historyRead messages in group DMs
channels:readList public channels (needed to resolve channel IDs from names/links)
groups:readList private channels the bot belongs to

For fetching a specific message by link (e.g. https://workspace.slack.com/archives/C0AFX21T06R/p1234567890), the adapter needs to call conversations.history with channel + latest/oldest clamped to that timestamp, which requires channels:history or groups:history depending on channel type.


Required Event Subscriptions (Bot Events)

EventPurpose
message.channelsReceive messages posted in public channels
message.groupsReceive messages posted in private channels
message.imReceive DMs (already likely subscribed)
message.mpimReceive group DMs

Proposed Changes

  1. OAuth scope manifest — add the six scopes above to the Slack app manifest / setup wizard so users get prompted to re-authorize when upgrading.

  2. gateway/platforms/slack.py — expose a fetch_message(channel_id, ts) helper that calls conversations.history and a fetch_thread(channel_id, thread_ts) helper that calls conversations.replies. Wire these up so the gateway can resolve Slack permalink URLs dropped into chat.

  3. hermes gateway setup — update the Slack setup wizard to display the required scopes checklist and warn if the token's granted scopes are missing any of the above (using auth.test + apps.permissions.info or parsing the x-oauth-scopes header).

  4. Docs — update the Slack platform page to list the required scopes and note that the bot must be invited to any channel it should read (Slack requires this even with channels:history).


Workaround (Today)

Users can manually call the Slack Web API from Hermes via terminal + curl:

curl -s "https://slack.com/api/conversations.history?channel=C0AFX21T06R&limit=10"   -H "Authorization: Bearer $SLACK_BOT_TOKEN" | jq .messages

But this requires the token to already have channels:history and is not surfaced as a native Hermes capability.


References

  • Slack API — conversations.history
  • Slack API — conversations.replies
  • Hermes skill troubleshooting note: "Slack bot only works in DMs: Must subscribe to message.channels event"
  • Reported in: internal LaVie session (channels #C0AFX21T06R, #C0AK2H2B1FV unreadable)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix feat: Slack adapter — add channel/DM history read scopes and message.channels event subscription