teknium1
5a2fcaab39
fix(gateway): harden Telegram polling conflict handling
- detect Telegram getUpdates conflicts and stop polling cleanly instead of retry-spamming forever
- add a machine-local token-scoped lock so different HERMES_HOME profiles on the same host can't poll the same bot token at once
- persist gateway runtime health/fatal adapter state and surface it in ● hermes-gateway.service - Hermes Agent Gateway - Messaging Platform Integration
Loaded: loaded (/home/teknium/.config/systemd/user/hermes-gateway.service; enabled; preset: enabled)
Active: active (running) since Sat 2026-03-14 09:25:35 PDT; 2h 45min ago
Invocation: 8879379b25994201b98381f4bd80c2af
Main PID: 1147926 (python)
Tasks: 16 (limit: 76757)
Memory: 151.4M (peak: 168.1M)
CPU: 47.883s
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/hermes-gateway.service
├─1147926 /home/teknium/.hermes/hermes-agent/venv/bin/python -m hermes_cli.main gateway run --replace
└─1147966 node /home/teknium/.hermes/hermes-agent/scripts/whatsapp-bridge/bridge.js --port 3000 --session /home/teknium/.hermes/whatsapp/session --mode self-chat
Mar 14 09:27:03 teknium-dev python[1147926]: 🔄 Retrying API call (2/3)...
Mar 14 09:27:04 teknium-dev python[1147926]: [409B blob data]
Mar 14 09:27:04 teknium-dev python[1147926]: Content: ''
Mar 14 09:27:04 teknium-dev python[1147926]: ❌ Max retries (3) for empty content exceeded.
Mar 14 09:27:07 teknium-dev python[1147926]: [1K blob data]
Mar 14 09:27:07 teknium-dev python[1147926]: Content: ''
Mar 14 09:27:07 teknium-dev python[1147926]: 🔄 Retrying API call (1/3)...
Mar 14 09:27:12 teknium-dev python[1147926]: [1.7K blob data]
Mar 14 09:27:12 teknium-dev python[1147926]: Content: ''
Mar 14 09:27:12 teknium-dev python[1147926]: 🔄 Retrying API call (2/3)...
⚠ Installed gateway service definition is outdated
Run: hermes gateway restart # auto-refreshes the unit
✓ Gateway service is running
✓ Systemd linger is enabled (service survives logout)
- cleanly exit non-retryable startup conflicts without triggering service restart loops
Tests:
- gateway status runtime-state helpers
- Telegram token-lock and polling-conflict behavior
- GatewayRunner clean exit on non-retryable startup conflict
- CLI runtime health summary
2026-03-14 12:11:23 -07:00
..
2026-03-14 00:09:05 -07:00
2026-03-14 08:05:30 -07:00
2026-03-14 00:12:34 -07:00
2026-03-14 14:27:20 +03:00
2026-03-14 12:11:23 -07:00
2026-03-14 12:11:23 -07:00
2026-03-12 16:23:34 -04:00
2026-03-11 20:14:44 -07:00
2026-03-14 04:16:48 -07:00
2026-03-14 11:27:02 -07:00
2025-10-01 23:29:25 +00:00
2026-03-14 03:14:34 -07:00
2026-03-12 08:35:45 -07:00
2026-03-14 02:33:31 -07:00
2026-03-10 15:22:44 -07:00
2026-03-12 01:23:28 -07:00
2026-03-11 06:52:55 -07:00
2026-03-14 11:03:20 -07:00
2026-03-13 20:44:25 -07:00
2026-03-13 02:09:52 -07:00
2026-03-07 21:00:12 -05:00
2026-03-14 02:56:13 -07:00
2026-03-01 19:59:24 -08:00
2026-03-02 17:18:15 +11:00
2026-03-11 21:06:54 -07:00
2026-03-13 23:59:12 -07:00
2026-03-14 06:31:32 -07:00
2026-03-12 08:35:45 -07:00
2026-03-10 17:31:00 -07:00
2026-03-12 16:02:35 -07:00
2026-03-13 21:53:54 -07:00
2026-03-14 10:33:58 -07:00
2026-03-13 23:59:12 -07:00
2026-03-13 03:14:04 -07:00
2026-03-14 15:00:45 +03:00
2026-03-08 20:22:33 -07:00
2026-03-13 21:34:01 -07:00
2026-03-09 21:01:40 -07:00
2026-03-01 19:59:24 -08:00
2026-03-11 21:38:29 -07:00
2026-03-09 02:19:32 -07:00
2026-03-11 21:06:54 -07:00
2026-03-14 06:44:14 -07:00
2026-03-01 03:12:37 -05:00
2026-03-06 14:50:57 -08:00
2026-03-12 08:35:45 -07:00
2026-03-12 08:35:45 -07:00
2026-03-13 21:56:12 -07:00
2026-03-13 23:39:51 -07:00
2026-03-10 17:12:34 -07:00
2026-03-05 18:46:30 -08:00
2026-03-09 17:31:54 +03:00
2026-03-13 23:59:12 -07:00
2026-03-14 03:51:28 -07:00
2026-03-12 15:05:42 -04:00
2026-03-12 05:38:19 -07:00
2026-03-12 08:35:45 -07:00
2026-03-08 17:45:45 -07:00
2026-03-11 04:28:31 -07:00
2026-03-14 06:14:22 -07:00
2026-03-13 23:59:12 -07:00
2026-03-13 04:42:26 +03:00
2026-03-14 10:33:32 -07:00
2026-03-14 06:19:28 -07:00
2026-02-26 13:54:20 +03:00
2026-03-09 23:27:19 -07:00
2026-03-14 11:03:25 -07:00
2026-03-07 21:05:40 -08:00