[Feature] Telegram plugin: include reply-to message context in channel notifications
When a Telegram user replies to a specific message (long-press > Reply), the Bot API provides the full replied-to message via ctx.message.reply_to_message. The plugin currently ignores this — only the new message text is forwarded to Claude, with no indication of which message it references.
This means Claude has no way to disambiguate what the user is referring to when they reply to a specific earlier message. From Claude's perspective, "yes do that" or "fix the conflicts on that one" arrives with no link to the message that provides context. In a busy session with multiple interleaved topics, this leads to Claude misattributing the user's intent.
The plugin already passes message_id in the channel meta for the inbound message. The suggested fix is to also include the replied-to context when present:
In handleInbound (server.ts ~line 962), the notification meta could add:
...(ctx.message?.reply_to_message ? {
reply_to_message_id: String(ctx.message.reply_to_message.message_id),
reply_to_text: ctx.message.reply_to_message.text
?? ctx.message.reply_to_message.caption
?? '',
} : {}),
This would let Claude see which prior message the user is responding to — the same context a human would get from the Telegram UI.
The reply_to_text field is the key piece. Without it, Claude would need to maintain a mapping of message IDs to content, which it can't do reliably across context compactions. Including the text directly keeps the notification self-contained.
Note: reply_to_message.from could also be included to distinguish whether the user is replying to their own earlier message vs one of Claude's replies, but the text alone covers the main use case.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗