-
-
Notifications
You must be signed in to change notification settings - Fork 52.7k
Closed
Description
Problem
Cron job announce delivery fails with message thread not found error in private chats (non-forum, non-group).
Root Cause
When a cron job runs an isolated session and announces the result back to Telegram:
- The announce system resolves the
originfrom the requester session (main session) - The origin's
threadIdis populated with a Telegram message ID from the chat context (e.g.,4905) - In
sendTelegramMessage()(line ~16797 of reply module), this threadId is passed tobuildTelegramThreadParams()with hardcodedscope: "forum":
const threadIdParams = buildTelegramThreadParams(messageThreadId != null ? {
id: messageThreadId,
scope: "forum" // Always "forum", even for private chats!
} : void 0);- Telegram API rejects
message_thread_idin private chats →400: Bad Request: message thread not found
Expected Behavior
- Private chat messages should NOT include
message_thread_id - The
scopeshould reflect the actual chat type, not be hardcoded to"forum"
Affected Features
- All cron jobs with
delivery.mode: "announce"anddelivery.channel: "telegram"fail to deliver results - The isolated sessions run successfully, but users never receive the announcement
Workaround
None found yet. Restarting gateway does not clear the cached origin threadId.
Environment
- OpenClaw 2026.2.6
- Telegram private chat (not a forum/group)
- Cron jobs with isolated sessions + announce delivery
Reproduction
- Set up OpenClaw with Telegram private chat (DM)
- Create a cron job with
sessionTarget: "isolated"anddelivery: {mode: "announce", channel: "telegram"} - Wait for the job to run
- Observe error:
GrammyError: Call to 'sendMessage' failed! (400: Bad Request: message thread not found)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels