You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add ~/.hermes/slack_accounts.json for multiple Slack account configs
open one AsyncApp + Socket Mode handler per {bot_token, app_token} account
acquire and release per-app-token gateway locks
persist channel→team routing so outbound sends after restart use the right workspace client
preserve existing SLACK_BOT_TOKEN + SLACK_APP_TOKEN fallback and send-only extra bot token behavior
Stack
This is stacked on #20583, which scopes Slack sessions/routing keys by workspace. Review/merge #20583 first; this PR adds true multi-workspace receive support on top.
Tests
uv run pytest tests/gateway/test_session.py tests/gateway/test_slack.py tests/gateway/test_slack_approval_buttons.py -q
Thanks for the multi-app Socket Mode implementation. The feature premise is still valid on current main: plugins/platforms/slack/adapter.py:962-1054 reads one app token and starts one Socket Mode app/handler.
Problems
The PR modifies gateway/platforms/slack.py, but commit 5600105478ffde29d7566b45421b100eaa29c4ef moved the adapter to plugins/platforms/slack/adapter.py; this needs a semantic port, not a cherry-pick.
The multi-handler design must retain current per-socket recovery. Main starts the handler and watchdog together at plugins/platforms/slack/adapter.py:1241-1249; its watchdog handles failed tasks/transports at :572-661. The PR's per-account create_task() path has no corresponding monitor.
The gateway/session.py change scopes every platform with guild_id, while current Discord callers provide it (plugins/platforms/discord/adapter.py:3208, :6334). That changes existing non-Slack session keys without a migration path.
Preserve newer Slack handlers when porting: main dispatches file_shared to _handle_slack_file_shared() at plugins/platforms/slack/adapter.py:1105-1107.
Suggested changes
Port into the bundled Slack plugin and model lifecycle/watchdog state per account.
Limit session-key changes to Slack or add a deliberate compatibility migration with cross-platform coverage.
Add multi-account recovery, file-share, action-handler, and colliding-workspace-ID tests.
Superseded by #66398 — a semantic port of this change onto the current bundled Slack adapter (plugins/platforms/slack/adapter.py) that resolves the hermes-sweeper review: ported into the plugin, per-account watchdog recovery, Slack-scoped session keys (no Discord/guild_id regression), file_shared kept dispatching to _handle_slack_file_shared, plus multi-account recovery / file-share / action-handler / colliding-workspace-ID tests. Suggest closing this in favor of #66398 once that lands.
Closing in favor of #66398, the semantic port onto the current bundled Slack adapter that resolves the hermes-sweeper review (plugin location, per-account watchdog recovery, Slack-scoped session keys, preserved file_shared, and the requested multi-account/file-share/action-handler/colliding-workspace-ID tests). Continue review on #66398.
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
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
Stack
This is stacked on #20583, which scopes Slack sessions/routing keys by workspace. Review/merge #20583 first; this PR adds true multi-workspace receive support on top.
Tests
Advances #10099.