Bug Description
Summary
The Gateway design to sends a "♻️ Gateway online" notification only on planned restarts (e.g. hermes gateway restart, /restart command), but it’s actually not happened. This leaves the user unaware that the gateway has come back online.
Environment
- Hermes version: latest (gateway running on macOS)
- Affected platforms: all platforms that use
_send_home_channel_startup_notifications (Telegram, LINE, Discord, etc.)
Steps to Reproduce
- Start gateway:
hermes gateway start (all channels connect normally)
- Use ‘hermes gateway restart’ or ‘hermes gateway stop’ or force quit Hermes (Cmd+Q) or
kill the gateway process — shutdown notification is sent as expected
- Start gateway again if the gateway has been stopped if not, just wait gateway finish restarting:
hermes gateway start
- ❌ No "♻️ Gateway online" notification is sent to the home channel
Expected Behavior
Every time the gateway starts successfully, "♻️ Gateway online — Hermes is back and ready." should be sent to configured home channels — except when a chat-originated /restart is in flight (its reply target already covers that lifecycle).
Actual Behavior
The startup notification is designed to sent only when planned_restart_notification_pending == True, which is set only on terminal / SIGUSR1 / service paths.
Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
Telegram
Debug Report
Report https://paste.rs/j9kFk
agent.log https://paste.rs/bTp8W
gateway.log https://paste.rs/Nm5Rh
gui.log https://paste.rs/rSGHr
desktop.log https://paste.rs/LWGb6
Operating System
MacOS 26.5.2
Python Version
3.11.5
Hermes Version
0.18.2
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
File: hermes-agent/gateway/run.py
Lines: 7307–7313
`if planned_restart_notification_pending: # ← only this branch sends notification
try:
await self._send_home_channel_startup_notifications(
skip_targets=None,
)
finally:
_clear_planned_restart_notification()
# No else branch for manual/crash recovery`
The _send_home_channel_startup_notifications() function itself correctly respects gateway_restart_notification: True (the default), but it is never called on non-planned startup paths.
Proposed Fix (optional)
Add an elif branch right after line 7313 in hermes-agent/gateway/run.py:
`elif not _restart_notification_pending():
# Also notify on manual start / crash recovery / service restart
try:
await self._send_home_channel_startup_notifications(
skip_targets=None,
)
except Exception as exc:
logger.warning("Startup notification (non-planned) failed: %s", exc)`
Are you willing to submit a PR for this?
Bug Description
Summary
The Gateway design to sends a "♻️ Gateway online" notification only on planned restarts (e.g.
hermes gateway restart,/restartcommand), but it’s actually not happened. This leaves the user unaware that the gateway has come back online.Environment
_send_home_channel_startup_notifications(Telegram, LINE, Discord, etc.)Steps to Reproduce
hermes gateway start(all channels connect normally)killthe gateway process — shutdown notification is sent as expectedhermes gateway startExpected Behavior
Every time the gateway starts successfully, "♻️ Gateway online — Hermes is back and ready." should be sent to configured home channels — except when a chat-originated
/restartis in flight (its reply target already covers that lifecycle).Actual Behavior
The startup notification is designed to sent only when
planned_restart_notification_pending == True, which is set only on terminal / SIGUSR1 / service paths.Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
Telegram
Debug Report
Operating System
MacOS 26.5.2
Python Version
3.11.5
Hermes Version
0.18.2
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
File:
hermes-agent/gateway/run.pyLines: 7307–7313
The
_send_home_channel_startup_notifications()function itself correctly respectsgateway_restart_notification: True(the default), but it is never called on non-planned startup paths.Proposed Fix (optional)
Add an
elifbranch right after line 7313 inhermes-agent/gateway/run.py:Are you willing to submit a PR for this?