fix(gateway): respect config.yaml slack.enabled when SLACK_BOT_TOKEN env var is set#15689
Closed
haru398801 wants to merge 1 commit into
Closed
fix(gateway): respect config.yaml slack.enabled when SLACK_BOT_TOKEN env var is set#15689haru398801 wants to merge 1 commit into
haru398801 wants to merge 1 commit into
Conversation
…env var is set Previously, setting SLACK_BOT_TOKEN in .env would unconditionally enable the Slack gateway adapter regardless of `slack.enabled: false` in config.yaml. This caused spurious "SLACK_APP_TOKEN not set" errors when the token was used only by skills (e.g. cron jobs that send Slack messages) rather than for the Hermes messaging gateway. Now, enabled: false in config.yaml is respected — the token is stored so skills can still use it, but the gateway adapter is not activated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Merged via #16288 — your commit was cherry-picked onto current main with authorship rewritten to your GitHub noreply email (1703a09). Original commit used a local-dev hostname which would have broken release-notes attribution. Thanks for the clean 5-line fix and the clear behavior-matrix in the PR body. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Setting
SLACK_BOT_TOKENin the environment (e.g..env) unconditionally enabled the Slack gateway adapter, overridingslack.enabled: falseinconfig.yaml. This caused a spurious error on every gateway startup:This happens because
SLACK_BOT_TOKENcan be used for purposes other than the Hermes messaging gateway — for example, skills or cron jobs that send Slack notifications don't require Socket Mode and therefore don't needSLACK_APP_TOKEN.Fix
Move
enabled = Trueinside theif Platform.SLACK not in config.platformsblock so that an explicitslack.enabled: falseinconfig.yamlis respected. The token is still stored on the config object so skills can access it, but the gateway adapter is not activated.Behavior change
SLACK_BOT_TOKENset, no yaml configSLACK_BOT_TOKENset,slack.enabled: truein yamlSLACK_BOT_TOKENset,slack.enabled: falsein yaml🤖 Generated with Claude Code