Bug type
Regression (worked before, now fails)
Summary
When channels.telegram.replyToMode is set to "first" (or any non-"off" value), Telegram streaming preview (streaming.mode: "partial") is completely disabled. The bot produces no visible output during generation, then delivers all messages at once when the run completes.
Steps to reproduce
- Set
channels.telegram.replyToMode to "first" (non-default) in openclaw.json
- Set
channels.telegram.streaming.mode to "partial"
- Send a message to the bot and observe response delivery
Expected behavior
Streaming preview should work normally — text appears character by character (or in chunks) via editMessageText on the preview message. The replyToMode setting should only affect which message is replied to, not whether streaming is active.
Actual behavior
Zero visible output during generation. All response messages arrive at once after the run finishes. Streaming is completely non-functional.
Root cause
In extensions/telegram/src/bot-message-dispatch.ts (dist: bot-msflwCEW.js in 2026.4.26):
const hasNativeQuoteReply = replyToMode !== "off" && Object.keys(replyQuoteByMessageId).length > 0;
const canStreamAnswerDraft = previewStreamingEnabled && !hasNativeQuoteReply && ...
When replyToMode !== "off", the handler always calls addTelegramNativeQuoteCandidate(replyQuoteByMessageId, msg.message_id, ...), which unconditionally populates replyQuoteByMessageId. This makes Object.keys(replyQuoteByMessageId).length > 0 always true, so hasNativeQuoteReply is always true, and canStreamAnswerDraft is always false.
The intended reason to disable streaming is when the reply contains a Telegram quote (i.e. reply_parameters.quote), because that parameter cannot be passed via editMessageText. A plain reply_to_message_id is fully compatible with streaming — it is passed on the first sendMessage call and subsequent editMessageText calls work fine. The code already correctly passes draftReplyToMessageId into createTelegramDraftStream, confirming the two features are designed to coexist.
Suggested fix
// Before (bug)
const hasNativeQuoteReply = replyToMode !== "off" && Object.keys(replyQuoteByMessageId).length > 0;
// After
const hasNativeQuoteReply = replyToMode !== "off" && replyQuoteText != null && replyQuoteMessageId != null;
This limits the streaming-disable guard to only genuine Telegram quote replies (where the user has selected quoted text), leaving plain reply-to-message streaming fully functional.
Configuration
{
"channels": {
"telegram": {
"replyToMode": "first",
"streaming": {
"mode": "partial"
}
}
}
}
Version
OpenClaw 2026.4.26
Bug type
Regression (worked before, now fails)
Summary
When
channels.telegram.replyToModeis set to"first"(or any non-"off"value), Telegram streaming preview (streaming.mode: "partial") is completely disabled. The bot produces no visible output during generation, then delivers all messages at once when the run completes.Steps to reproduce
channels.telegram.replyToModeto"first"(non-default) inopenclaw.jsonchannels.telegram.streaming.modeto"partial"Expected behavior
Streaming preview should work normally — text appears character by character (or in chunks) via
editMessageTexton the preview message. ThereplyToModesetting should only affect which message is replied to, not whether streaming is active.Actual behavior
Zero visible output during generation. All response messages arrive at once after the run finishes. Streaming is completely non-functional.
Root cause
In
extensions/telegram/src/bot-message-dispatch.ts(dist:bot-msflwCEW.jsin 2026.4.26):When
replyToMode !== "off", the handler always callsaddTelegramNativeQuoteCandidate(replyQuoteByMessageId, msg.message_id, ...), which unconditionally populatesreplyQuoteByMessageId. This makesObject.keys(replyQuoteByMessageId).length > 0alwaystrue, sohasNativeQuoteReplyis alwaystrue, andcanStreamAnswerDraftis alwaysfalse.The intended reason to disable streaming is when the reply contains a Telegram quote (i.e.
reply_parameters.quote), because that parameter cannot be passed viaeditMessageText. A plainreply_to_message_idis fully compatible with streaming — it is passed on the firstsendMessagecall and subsequenteditMessageTextcalls work fine. The code already correctly passesdraftReplyToMessageIdintocreateTelegramDraftStream, confirming the two features are designed to coexist.Suggested fix
This limits the streaming-disable guard to only genuine Telegram quote replies (where the user has selected quoted text), leaving plain reply-to-message streaming fully functional.
Configuration
{ "channels": { "telegram": { "replyToMode": "first", "streaming": { "mode": "partial" } } } }Version
OpenClaw 2026.4.26