hermes - 💡(How to fix) Fix feat: configurable auto-resume delay for paused gateway platforms [1 pull requests]

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…

Fix Action

Fixed

Code Example

gateway:
  platform_resume_delay: 10  # auto-resume after 10 minutes
RAW_BUFFERClick to expand / collapse

Problem

When the Hermes Gateway loses connection to a platform (e.g. Telegram), the circuit breaker pauses it after 10 consecutive failures. The pause is permanent — next_retry is set to float("inf") — so even after the underlying network issue is resolved (e.g. Clash/VPN reconnects), the platform stays paused until the user manually runs /platform resume <name> or restarts the gateway.

This is a common pain point for users behind dynamic proxy/VPN setups (Clash, Surge, etc.), where network interruptions are temporary but the gateway has no way to recover autonomously.

Proposed Solution

Add a config option gateway.platform_resume_delay (in minutes, default 0 = backward compatible) that controls how long the gateway waits before automatically resuming a paused platform.

When > 0:

  • _pause_failed_platform() sets a finite next_retry = now + delay_min * 60
  • The reconnect watcher checks a new auto_resume_at field on each tick
  • When the timeout expires, the platform is auto-resumed and the watcher attempts reconnection
  • /platform pause (manual) does NOT set auto_resume_at, so manually paused platforms still require explicit /platform resume

Environment variable override: HERMES_PLATFORM_RESUME_DELAY

Implementation

The changes are contained in gateway/run.py (4 touch points):

  1. __init__: load the config value into self._platform_resume_delay
  2. _load_platform_resume_delay(): new static method reading from config.yaml or env var
  3. _pause_failed_platform(): use the delay instead of float("inf") when > 0, log auto-resume info
  4. Reconnect watcher: check auto_resume_at on paused platforms and auto-resume when expired

Example Config

gateway:
  platform_resume_delay: 10  # auto-resume after 10 minutes

Backward Compatibility

Default 0 preserves the current behavior (never auto-resume). No config change needed for existing setups.


PR: #pending

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 feat: configurable auto-resume delay for paused gateway platforms [1 pull requests]