hermes - 💡(How to fix) Fix Telegram bot token already in use after hermes update — gateway fails to start, Telegram broken afterwards [2 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…

Error Message

Error seen:

  1. Warn the user that the gateway is running and prompt them to restart post-update
  2. Try hermes gateway run again — fails with the PID error

Root Cause

When Hermes Agent is updated (e.g. via hermes update) while the gateway is running, the new binary fails to start because the Telegram bot token is still registered to the previous gateway process.

Fix Action

Fixed

Code Example

telegram: Telegram bot token already in use (PID 68653). Stop the other gateway first.
RAW_BUFFERClick to expand / collapse

Problem

When Hermes Agent is updated (e.g. via hermes update) while the gateway is running, the new binary fails to start because the Telegram bot token is still registered to the previous gateway process.

Error seen:

telegram: Telegram bot token already in use (PID 68653). Stop the other gateway first.

Root cause:

hermes update replaces the binary in-place but does not stop the running gateway. The old process still holds the Telegram polling connection, so the new binary cannot re-bind the same bot token.

Expected behavior

hermes update should either:

  1. Stop the gateway before replacing the binary, then auto-restart it
  2. Warn the user that the gateway is running and prompt them to restart post-update
  3. Detect if the bot token is in use and fail gracefully with a clear message

Additional issue — Telegram completely broken after the failed update

Even after resolving the PID conflict (killing the stale process, restarting gateway), Telegram remains broken. The Hermes backend still reports "connected" but the bot is completely unresponsive — it will not receive or send messages. Telegram was working fine before the update attempt.

This suggests the failed update may have corrupted the Telegram polling state or left the bot token in an invalid state server-side.

Steps to reproduce

  1. Start hermes gateway run
  2. In another terminal, run hermes update
  3. Try hermes gateway run again — fails with the PID error
  4. Kill the stale process, restart gateway — Telegram still broken

Environment

  • Hermes v0.13.0 (2026.5.7)
  • macOS
  • Gateway running with Telegram polling
  • Bot token in ~/.hermes/.env

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…

FAQ

Expected behavior

hermes update should either:

  1. Stop the gateway before replacing the binary, then auto-restart it
  2. Warn the user that the gateway is running and prompt them to restart post-update
  3. Detect if the bot token is in use and fail gracefully with a clear message

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 Telegram bot token already in use after hermes update — gateway fails to start, Telegram broken afterwards [2 pull requests]