Summary
Unhandled promise rejections from Telegram API fetch failures crash the entire gateway, not just the Telegram channel. This kills all running agents and disconnects all channels.
Steps to reproduce
- Enable Telegram channel with valid bot token
- Run gateway during intermittent network conditions
- Observe full gateway crashes (not just channel restarts)
Expected behavior
Telegram API fetch failures should be caught and handled gracefully without affecting the gateway or other channels.
Actual behavior
Unhandled promise rejection causes the entire gateway to crash and restart:
- All running agents are terminated mid-execution
- All channel connections are dropped
- Gateway must fully reinitialize
The crash cycle repeats with each fetch failure during network instability.
Environment
- Clawdbot version: 2026.1.24-3
- OS: Linux (arm64)
- Install method: curl | sh
- Node.js: v22.22.0
- Telegram mode: polling
Logs or screenshots
Error immediately before crash:
[clawdbot] Unhandled promise rejection: TypeError: fetch failed
at node:internal/deps/undici/undici:14902:13
at processTicksAndRejections (node:internal/process/task_queues:105:5)
Followed by gateway restart indicators:
[gateway/canvas] canvas host mounted at http://127.0.0.1:18789/...
[gateway/heartbeat] heartbeat: started
This pattern repeats ~74 times in one day during network instability.
Impact
- Running agents killed without graceful shutdown
- All channels disconnected simultaneously
- Session state may be lost
Related: #2876 (similar issue with setMyCommands during startup)
Summary
Unhandled promise rejections from Telegram API fetch failures crash the entire gateway, not just the Telegram channel. This kills all running agents and disconnects all channels.
Steps to reproduce
Expected behavior
Telegram API fetch failures should be caught and handled gracefully without affecting the gateway or other channels.
Actual behavior
Unhandled promise rejection causes the entire gateway to crash and restart:
The crash cycle repeats with each fetch failure during network instability.
Environment
Logs or screenshots
Error immediately before crash:
Followed by gateway restart indicators:
This pattern repeats ~74 times in one day during network instability.
Impact
Related: #2876 (similar issue with
setMyCommandsduring startup)