Environment
- OpenClaw version: 2026.1.29
- Node versions tested: v22.22.0, v24.13.0
- OS: macOS 26.2 (arm64)
- Telegram mode: Long-polling (default)
Problem
Telegram sendMessage, sendChatAction, and other outbound API calls fail with:
Network request for 'sendMessage' failed!
TypeError: fetch failed
at node:internal/deps/undici/undici:14902:13
Inbound messages work fine — the gateway receives Telegram messages via getUpdates long-polling. Only outbound calls fail.
Key finding: It's NOT a network issue
Both curl and standalone Node.js work perfectly:
# Works
curl -s "https://api.telegram.org/bot<token>/sendMessage" -d "chat_id=<id>" -d "text=test"
# Works
node -e "fetch('https://api.telegram.org/bot<token>/sendMessage', {method:'POST', body: new URLSearchParams({chat_id:'<id>',text:'test'})}).then(r=>r.json()).then(console.log)"
# Works
node -e "require('https').request({hostname:'api.telegram.org', path:'/bot<token>/sendMessage', method:'POST'}, ...).end()"
Only the gateway process's fetch calls fail.
Steps to reproduce
- Configure Telegram bot token in
channels.telegram.botToken
- Approve a user via pairing
- User sends message → gateway receives it ✅
- Gateway tries to reply →
Network request for 'sendMessage' failed! ❌
Logs
2026-01-30T18:55:16.513Z ERROR telegram sendMessage failed: Network request for 'sendMessage' failed!
2026-01-30T18:55:16.534Z ERROR telegram final reply failed: HttpError: Network request for 'sendMessage' failed!
The logs show telegram: autoSelectFamily=false (default-node22) on startup.
Attempted fixes (none worked)
- Restarting gateway multiple times
- Flushing DNS cache
- Switching between Node 22.22.0 and Node 24.13.0
- Gateway stop/start cycle
Workaround
Using curl via exec to send Telegram messages works, but obviously not sustainable.
Possible cause
Something specific to how undici/fetch is used in the long-running gateway process vs one-shot Node scripts. Maybe connection pooling, keep-alive, or DNS caching issue within the process?
Environment
Problem
Telegram
sendMessage,sendChatAction, and other outbound API calls fail with:Inbound messages work fine — the gateway receives Telegram messages via
getUpdateslong-polling. Only outbound calls fail.Key finding: It's NOT a network issue
Both curl and standalone Node.js work perfectly:
Only the gateway process's fetch calls fail.
Steps to reproduce
channels.telegram.botTokenNetwork request for 'sendMessage' failed!❌Logs
The logs show
telegram: autoSelectFamily=false (default-node22)on startup.Attempted fixes (none worked)
Workaround
Using
curlvia exec to send Telegram messages works, but obviously not sustainable.Possible cause
Something specific to how undici/fetch is used in the long-running gateway process vs one-shot Node scripts. Maybe connection pooling, keep-alive, or DNS caching issue within the process?