hermes - 💡(How to fix) Fix Feature request: config option to suppress gateway shutdown/restart notifications

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…

When the gateway shuts down or restarts (e.g. due to rolling updates in Kubernetes), it sends a notification to all active sessions:

⚠️ Gateway restarting — Your current task will be interrupted. Send any message after restart and I'll try to resume where you left off.

In a multi-bot deployment (13 bots), routine operations like patching a shared Secret trigger Reloader-based rolling restarts across all Deployments. This results in every bot sending shutdown notifications to their active chats, which is noisy and confusing to users — especially when the restart is expected and brief.

Root Cause

When the gateway shuts down or restarts (e.g. due to rolling updates in Kubernetes), it sends a notification to all active sessions:

⚠️ Gateway restarting — Your current task will be interrupted. Send any message after restart and I'll try to resume where you left off.

In a multi-bot deployment (13 bots), routine operations like patching a shared Secret trigger Reloader-based rolling restarts across all Deployments. This results in every bot sending shutdown notifications to their active chats, which is noisy and confusing to users — especially when the restart is expected and brief.

Fix Action

Fix / Workaround

In a multi-bot deployment (13 bots), routine operations like patching a shared Secret trigger Reloader-based rolling restarts across all Deployments. This results in every bot sending shutdown notifications to their active chats, which is noisy and confusing to users — especially when the restart is expected and brief.

Code Example

agent:
  shutdown_notify: false  # default: true
RAW_BUFFERClick to expand / collapse

Summary

When the gateway shuts down or restarts (e.g. due to rolling updates in Kubernetes), it sends a notification to all active sessions:

⚠️ Gateway restarting — Your current task will be interrupted. Send any message after restart and I'll try to resume where you left off.

In a multi-bot deployment (13 bots), routine operations like patching a shared Secret trigger Reloader-based rolling restarts across all Deployments. This results in every bot sending shutdown notifications to their active chats, which is noisy and confusing to users — especially when the restart is expected and brief.

Current behavior

_notify_active_sessions_of_shutdown() in gateway/run.py is called unconditionally during stop(). There is no configuration option to disable or suppress these notifications.

Proposed solution

Add a config option under agent: to control this behavior, e.g.:

agent:
  shutdown_notify: false  # default: true

When set to false, the gateway would skip sending shutdown/restart messages to active sessions but still perform the normal drain and interrupt flow.

Alternatively, a more granular approach:

  • shutdown_notify: "active_only" — only notify sessions with a currently running agent (current behavior)
  • shutdown_notify: "none" — suppress all notifications
  • shutdown_notify: "all" — notify all recent sessions (including idle ones)

Environment

  • Hermes Agent v2026.5.7
  • 13 bots on K3s cluster
  • Reloader watches shared Secrets → triggers rolling restarts
  • Relevant code: gateway/run.py line ~2476 (_notify_active_sessions_of_shutdown)

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