Bug Description
When a Telegram Premium user enables Topics in a private bot chat, proactive sends (cron job announcements, etc.) fail with:
GrammyError: Call to 'sendMessage' failed! (400: Bad Request: message thread not found)
Root Cause
In buildTelegramThreadParams, thread ID 1 (the general topic) is only skipped for scope: "forum":
if (normalized === TELEGRAM_GENERAL_TOPIC_ID && thread.scope === "forum") return;
Private chat topics were added in Bot API 9.3 (Dec 2025). When Topics is enabled in a private chat, incoming messages include message_thread_id: 1. OpenClaw stores this thread context with scope: "dm". On proactive sends, it passes message_thread_id: 1 back to the API — which Telegram rejects, because thread ID 1 (general topic) cannot be explicitly specified in sendMessage calls, regardless of chat type.
Expected Behavior
Proactive sends to private chats with Topics enabled should succeed by omitting message_thread_id when the thread ID is 1.
Suggested Fix
Skip thread ID 1 for all scopes, not just forum:
if (normalized === TELEGRAM_GENERAL_TOPIC_ID) return;
Workaround
Disable Topics in the bot's private chat settings.
Environment
- OpenClaw 2026.2.6-3
- Telegram Premium with Topics enabled in private bot chat
- Bot API 9.3+
Bug Description
When a Telegram Premium user enables Topics in a private bot chat, proactive sends (cron job announcements, etc.) fail with:
Root Cause
In
buildTelegramThreadParams, thread ID 1 (the general topic) is only skipped forscope: "forum":Private chat topics were added in Bot API 9.3 (Dec 2025). When Topics is enabled in a private chat, incoming messages include
message_thread_id: 1. OpenClaw stores this thread context withscope: "dm". On proactive sends, it passesmessage_thread_id: 1back to the API — which Telegram rejects, because thread ID 1 (general topic) cannot be explicitly specified insendMessagecalls, regardless of chat type.Expected Behavior
Proactive sends to private chats with Topics enabled should succeed by omitting
message_thread_idwhen the thread ID is 1.Suggested Fix
Skip thread ID 1 for all scopes, not just forum:
Workaround
Disable Topics in the bot's private chat settings.
Environment