Skip to content

[Bug]: Telegram DM Topics (message_thread_id): replies land outside thread despite replyToMode=all [v2026.2.17 regression] #19896

@NabilJabour

Description

@NabilJabour

Summary

In Telegram private chats with Topics enabled, bot replies arrive outside the
topic thread
.
The dotted-line preview in Telegram shows the reply is attributed to the thread, but
opening
the thread doesn't show the bot's message — it's at the DM root level instead.

Environment

  • Version: 2026.2.17
  • Channel: Telegram (multi-account setup)
  • Chat type: Private DM with Topics enabled

Inbound message (from debug log)

{
"chat": { "id": , "type": "private" },
"message_thread_id": 3519,
"is_topic_message": true
}

Config

channels.telegram.replyToMode = "all"
channels.telegram.streamMode = "off"
session.dmScope = "per-account-channel-peer"
(Same on all accounts)

Expected (per docs)

"DM messages can carry message_thread_id; OpenClaw routes them with thread-aware
session
keys and preserves thread ID for replies."

Actual

Replies sent without message_thread_id AND without reply_to_message_id.
agent tags also appear to be silently ignored for DM topic sessions.
replyToMode=all auto-injection is bypassed.

Note

This worked before. streamMode=off rules out the old streaming preview bug.
The replyToId is not being passed through the dispatch chain for DM topic sessions.

Steps to reproduce

  1. Enable Topics in a Telegram private chat (DM) with a bot
  2. Start a new topic thread and send a message to the bot
  3. Observe the bot's reply

Expected behavior

Bot reply appears inside the topic thread (message_thread_id is preserved
on outbound sendMessage, keeping the reply in the correct thread).

Actual behavior

Bot reply lands outside the thread at the DM root level. The dotted-line
preview in Telegram attributes it to the thread, but opening the thread
shows no bot reply — it appears in the main DM instead.

replyToMode=all and tags are both set but have no
effect. The message_thread_id from the inbound message is not being
passed to outbound sendMessage for DM topic sessions.

OpenClaw version

2026.2.17

Operating system

Ubuntu 24.04

Install method

npm global

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleMarked as stale due to inactivity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions