Skip to content

Gateway exits with error when any messaging platform fails to connect (should degrade gracefully) #5196

@jordanhubbard

Description

@jordanhubbard

Bug: Gateway bails on all configured messaging platforms failed to connect when only one fails

Summary

If hermes gateway run is configured with multiple messaging platforms (e.g. Slack + Mattermost) and any single platform fails to connect, the gateway exits with an error instead of running with the remaining connected platforms.

Behavior

WARNING gateway.run: Slack: slack-bolt not installed. Run: pip install 'hermes-agent[slack]'
WARNING gateway.run: No adapter available for slack
WARNING gateway.run: Mattermost: MATTERMOST_TOKEN or MATTERMOST_URL not set, or aiohttp missing
WARNING gateway.run: No adapter available for mattermost
ERROR gateway.run: Gateway failed to connect any configured messaging platform: all configured messaging platforms failed to connect

Gateway exits immediately. The same behavior occurs when one platform has wrong credentials — even if another platform would connect fine.

Expected Behavior

  • If at least one messaging platform connects successfully, the gateway should run with that platform
  • Failed platforms should log a warning and be skipped, not abort the whole gateway
  • Only exit with error if all configured platforms fail

Why This Matters

In a distributed fleet deployment, nodes may have partial credentials (e.g. Mattermost but not Slack, or vice versa). The current behavior makes it impossible to run any gateway without perfectly configured credentials for every listed platform.

Workaround

Remove tokens for platforms you don't want configured — a missing token correctly skips the platform. But this is a footgun if tokens are populated by a secrets sync script.

Environment

  • hermes v0.7.0
  • Reproduced on 5 nodes simultaneously during fleet migration

Metadata

Metadata

Assignees

No one assigned

    Labels

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