Hello,
My agent is able to send messages on Telegram, but it is not receiving any replies at all. After checking the system logs, I noticed that the Telegram "health-monitor" keeps restarting the connection due to a "stuck" state.
I have confirmed that the bot token is correct, the dmPolicy is set to open, and I have restarted the gateway multiple times, but the issue persists. The configuration appears to be correct, but there seems to be a problem with receiving incoming connections/messages.
#Telegram issue
1 messages · Page 1 of 1 (latest)
If Telegram can send but never receives (and you see the Telegram health-monitor restarting a “stuck” runner), there are a couple common root causes. The fastest way to narrow it down:
0) Grab the basics (so we don’t guess)
Please paste (tokens redacted is fine):
openclaw --version
openclaw gateway status
openclaw channels status --probe
openclaw logs --follow
Also include ~20-40 log lines around the “stuck” / restart message.
Docs runbook: https://docs.openclaw.ai/gateway/troubleshooting
1) Check for the #1 Telegram Bot API gotcha: webhook is still enabled
If this bot token was ever used with another framework, Telegram may still have a webhook set. When a webhook is active, long polling (getUpdates) won’t deliver updates (often you’ll see “stuck” behavior / conflicts).
Run locally (don’t paste your token into Discord):
curl "https://api.telegram.org/bot<YOUR_TOKEN>/getWebhookInfo"
If it shows a webhook URL set, clear it:
curl "https://api.telegram.org/bot<YOUR_TOKEN>/deleteWebhook?drop_pending_updates=true"
openclaw gateway restart
2) Check for “two consumers” (another process polling the same token)
If anything else is running with the same token, Telegram will return conflicts and you won’t get updates reliably.
Search your logs for 409 / Conflict / getUpdates errors. Also make sure you don’t have two gateways running:
openclaw gateway status
3) Network / IPv6 weirdness (common on some VPSes)
If logs contain stuff like TypeError: fetch failed / Network request for 'getUpdates' failed! this is often DNS/IPv6 egress instability.
Quick config knobs (JSON5):
{
channels: {
telegram: {
network: {
autoSelectFamily: false,
dnsResultOrder: "ipv4first",
},
// optional: if your host needs a proxy to reach api.telegram.org reliably
// proxy: "socks5://user:pass@proxy-host:1080",
},
},
}
Then restart the gateway.
Telegram docs (incl. the network section): https://docs.openclaw.ai/channels/telegram
Channel troubleshooting ladder: https://docs.openclaw.ai/channels/troubleshooting