What problem does it solve?
This Skill provides a clear, actionable procedure to stop Telegram 401 errors and "Another local Hermes gateway is already using this Telegram bot token" lock conflicts that occur when multiple Hermes gateway or command-agent processes on one host attempt to poll the same Telegram bot token.
Core Features & Use Cases
- Identify root causes: Explains common causes including systemd units hardcoding TELEGRAM_BOT_TOKEN, shared gateway.env files, multiple concurrent gateway processes, stale lock files, and stale gateway_state.json.
- Safe remediation steps: Shows how to remove TELEGRAM_BOT_TOKEN from systemd, disable Telegram in the default agent config, kill duplicate gateway processes, and clean stale lock and state files.
- Verification guidance: Describes how to verify processes and detect stale locks so Telegram polling is owned by the intended agent.
- Use Case: Recover a multi-agent Hermes deployment on a single server after accidental gateway takeover or after gateway crashes leave stale locks.
Quick Start
Run the hermes-telegram-fix procedure to remove TELEGRAM_BOT_TOKEN from systemd, disable Telegram in the default agent config, terminate duplicate gateway processes, delete stale gateway lock files and gateway_state.json, and then restart gateway and cmd-agent services to restore correct token ownership.