Skip to content

[Bug] Gateway keeps reconnecting Discord despite disabled config #30803

@heorange

Description

@heorange

Bug Description

Gateway continuously attempts to reconnect Discord platform even when it is explicitly disabled in config and listed in plugins.disabled. The reconnection watcher keeps retrying indefinitely with exponential backoff, spamming the logs with "No bot token configured" errors.

Steps to Reproduce

  1. Have Discord in plugins.disabled list:
plugins:
  disabled:
    - platforms/discord
  1. Set discord.enabled: false in config.yaml
  2. Start gateway: hermes gateway run
  3. Observe gateway log

Expected Behavior

Gateway should skip connecting to Discord entirely when disabled, without logging errors or starting reconnection watchers.

Actual Behavior

Gateway logs show:

INFO gateway.run: Connecting to discord...
ERROR hermes_plugins.discord_platform.adapter: [Discord] No bot token configured
WARNING gateway.run: ✗ discord failed to connect
INFO gateway.run: Starting reconnection watcher for 1 failed platform(s): discord
INFO gateway.run: Reconnecting discord (attempt 2)...
ERROR hermes_plugins.discord_platform.adapter: [Discord] No bot token configured
INFO gateway.run: Reconnect discord failed, next retry in 60s

The reconnection loop continues indefinitely with exponential backoff (60s, 120s, 240s...).

Environment

  • Hermes Agent v0.14.0 (2026.5.16)
  • Python: 3.11.15
  • OS: Linux (6.18.7-76061807-generic)
  • Config: discord.enabled = false, plugins.disabled includes platforms/discord

Root Cause Analysis

The platform initialization logic appears to ignore the enabled: false flag and plugins.disabled list. The gateway always attempts to connect to all registered platform adapters regardless of their enabled state. The reconnection watcher then treats the connection failure as a transient error and keeps retrying.

Workaround

Manually kill the gateway process and restart after setting discord.enabled: false — but the issue persists across restarts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/gatewayGateway runner, session dispatch, deliveryplatform/discordDiscord bot 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