hermes - 💡(How to fix) Fix [Bug]: plugin platform auto-enable starts Discord without DISCORD_BOT_TOKEN

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

ERROR hermes_plugins.discord_platform.adapter: [Discord] No bot token configured

Root Cause

Suspected Root Cause

Code Example

discord:
  require_mention: true
  free_response_channels: ''
  allowed_channels: ''

---

telegram enabled= True token_set= True
discord enabled= True token_set= False
slack enabled= False token_set= False

---

Connecting to telegram...
✓ telegram connected
Connecting to discord...
ERROR hermes_plugins.discord_platform.adapter: [Discord] No bot token configured
WARNING gateway.run: ✗ discord failed to connect
Starting reconnection watcher for 1 failed platform(s): discord
Gateway running with 1 platform(s)

---

for entry in platform_registry.plugin_entries():
    if not entry.check_fn():
        continue
    platform = Platform(entry.name)
    if platform not in config.platforms:
        config.platforms[platform] = PlatformConfig()
    config.platforms[platform].enabled = True
RAW_BUFFERClick to expand / collapse

Bug Description

After the Discord adapter migration to a bundled plugin, the gateway auto-enables Discord when the Discord plugin dependencies are available, even when Discord is not actually configured and DISCORD_BOT_TOKEN is unset.

This makes the gateway try to connect Discord on every startup, log No bot token configured, and start a reconnect watcher for a platform the operator does not use.

Reproduction

  1. Install/update Hermes with bundled Discord plugin dependencies present.
  2. Do not set DISCORD_BOT_TOKEN in ~/.hermes/.env.
  3. Have either no Discord auth config, or only non-auth Discord defaults/settings in config.yaml such as:
discord:
  require_mention: true
  free_response_channels: ''
  allowed_channels: ''
  1. Start/restart the gateway.

Actual Behavior

Runtime config reports Discord as enabled even though no token exists:

telegram enabled= True token_set= True
discord enabled= True token_set= False
slack enabled= False token_set= False

Gateway logs:

Connecting to telegram...
✓ telegram connected
Connecting to discord...
ERROR hermes_plugins.discord_platform.adapter: [Discord] No bot token configured
WARNING gateway.run: ✗ discord failed to connect
Starting reconnection watcher for 1 failed platform(s): discord
Gateway running with 1 platform(s)

Expected Behavior

Discord should stay disabled unless the operator provides real Discord configuration, especially DISCORD_BOT_TOKEN, or explicitly enables Discord with valid auth. Installed dependencies alone should not cause the gateway to instantiate or reconnect a Discord adapter.

Suspected Root Cause

In gateway/config.py, the registry-driven plugin enablement loop treats entry.check_fn() as the source of truth for whether a plugin platform should be enabled:

for entry in platform_registry.plugin_entries():
    if not entry.check_fn():
        continue
    platform = Platform(entry.name)
    if platform not in config.platforms:
        config.platforms[platform] = PlatformConfig()
    config.platforms[platform].enabled = True

For Discord, check_fn is dependency availability, not auth/config readiness. The Discord plugin already exposes is_connected, which checks DISCORD_BOT_TOKEN; auto-enable should probably use entry.is_connected(config) / entry.validate_config(config) / required env presence before setting enabled=True, and reserve check_fn for dependency checks after configuration is known.

Environment

  • Hermes checkout: NousResearch/hermes-agent
  • Upstream HEAD tested: 874c2b1fe fix(tui): ignore late thinking deltas after completion (#31055)
  • Platform: macOS launchd gateway
  • Discord token: unset
  • Telegram token: set and working

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 [Bug]: plugin platform auto-enable starts Discord without DISCORD_BOT_TOKEN