Summary
When replying to messages in a Telegram forum group topic, the reply is processed correctly by the agent but the outbound sendMessage call to Telegram only includes chat_id (the group), omitting message_thread_id (the topic). The message lands in the group's main chat instead of the specific topic, making it invisible to users browsing that topic.
Environment
- OpenClaw: 2026.5.6 (issue also present on 2026.5.4, 2026.5.4-beta.3)
- Channel: Telegram polling
- Group type: Telegram Forum (supergroup with
is_forum: true)
- Config:
channels.telegram.groups["-1003759908827"].topics configured with per-topic systemPrompts
Reproduction
- Configure a Telegram forum group with
topics in openclaw.json:
{
"channels": {
"telegram": {
"groups": {
"-1003759908827": {
"requireMention": false,
"topics": {
"55": { "systemPrompt": "..." }
}
}
}
}
}
}
- Send a message in topic 55 from Telegram
- Agent receives the message, generates a reply
sessions.json shows correct deliveryContext:
{
"channel": "telegram",
"to": "telegram:-1003759908827",
"accountId": "default",
"threadId": 55
}
- Gateway log shows:
[telegram] sendMessage ok chat=-1003759908827 message=21230
Expected: API call includes message_thread_id: 55 → reply appears in topic 55
Actual: Only chat_id sent → reply appears in group main chat (not visible in topic)
Evidence
systemSent: true in sessions.json — Gateway believes it sent successfully
lastThreadId: 55 — threadId is tracked in session state
deliveryContext.threadId: 55 — correct value in delivery context
- But the Telegram
sendMessage log shows no threadId parameter being passed
- The reply message (21230) is visible in the group's main chat, not in topic 55
When It Broke
Last successful topic reply: 2026-05-04 15:33 (message 21166)
Around the same time, the active-memory plugin started failing with:
Error: Bundled plugin dirName must be a single directory: -1003759908827:topic:55
The active-memory plugin is now disabled, but the topic delivery issue persists even after:
- Restarting Gateway
- Deleting and re-creating the topic 55 session from sessions.json
- Upgrading from 2026.5.4 → 2026.5.6
Hypothesis
The session delivery path for Telegram forum topics either:
- Never correctly mapped
threadId → message_thread_id for the outbound sendMessage call, OR
- A regression somewhere between working state and 2026.5.4 broke the threadId pass-through in the Telegram channel delivery layer
Workaround
None currently. Topic replies are silently lost to the group main chat.
Summary
When replying to messages in a Telegram forum group topic, the reply is processed correctly by the agent but the outbound
sendMessagecall to Telegram only includeschat_id(the group), omittingmessage_thread_id(the topic). The message lands in the group's main chat instead of the specific topic, making it invisible to users browsing that topic.Environment
is_forum: true)channels.telegram.groups["-1003759908827"].topicsconfigured with per-topic systemPromptsReproduction
topicsinopenclaw.json:{ "channels": { "telegram": { "groups": { "-1003759908827": { "requireMention": false, "topics": { "55": { "systemPrompt": "..." } } } } } } }sessions.jsonshows correct deliveryContext:{ "channel": "telegram", "to": "telegram:-1003759908827", "accountId": "default", "threadId": 55 }Expected: API call includes
message_thread_id: 55→ reply appears in topic 55Actual: Only
chat_idsent → reply appears in group main chat (not visible in topic)Evidence
systemSent: truein sessions.json — Gateway believes it sent successfullylastThreadId: 55— threadId is tracked in session statedeliveryContext.threadId: 55— correct value in delivery contextsendMessagelog shows no threadId parameter being passedWhen It Broke
Last successful topic reply: 2026-05-04 15:33 (message 21166)
Around the same time, the
active-memoryplugin started failing with:The active-memory plugin is now disabled, but the topic delivery issue persists even after:
Hypothesis
The session delivery path for Telegram forum topics either:
threadId→message_thread_idfor the outboundsendMessagecall, ORWorkaround
None currently. Topic replies are silently lost to the group main chat.