Summary
OpenClaw fails to properly support Telegram topic/thread replies for skills and the message tool. Responses are always sent to the "general" topic instead of the correct thread, even when replyTo parameters are used. The issue can be bypassed by using the Telegram Bot API directly, confirming this is an OpenClaw bug.
Environment
- OpenClaw Version: 2026.2.9
- OS: Linux 6.12.57+deb12-amd64 (x64)
- Node: v22.22.0
- Telegram Configuration: Supergroup with forum topics enabled
Configuration
openclaw.json Telegram section (anonymized):
"telegram": {
"enabled": true,
"groups": {
"<CHAT_ID>": {
"requireMention": false,
"groupPolicy": "open",
"topics": {
"7": {
"requireMention": false
}
}
}
}
}
Problem Description
When a skill or agent attempts to reply to a message in a Telegram topic/thread, the response is incorrectly routed to the "general" topic instead of staying in the same thread.
Expected Behavior
- Skill responses should remain in the same topic/thread as the triggering message
openclaw.tools.message.send() with replyTo parameter should respect thread context
- Telegram's
reply_to_message_id should propagate through OpenClaw
Actual Behavior
- All skill responses go to "general" topic
message tool with replyTo parameter ignores thread context
- Only direct Telegram Bot API calls work correctly
Evidence and Testing
1. Skill Return Text (FAILS)
Code:
async run(context) {
return {
text: "Response text",
done: true
};
}
Result: Response goes to "general" topic ❌
2. Message Tool with replyTo (FAILS)
Code:
await openclaw.tools.message.send({
session,
text: "Response text",
replyTo: message.id
});
Result: Response goes to "general" topic ❌
3. Telegram Bot API Direct Call (WORKS)
Code:
await axios.post(`https://api.telegram.org/bot${BOT_TOKEN}/sendMessage`, {
chat_id: chatId,
text: "Response text",
reply_to_message_id: messageId,
parse_mode: "Markdown"
});
Response from Telegram API:
{
"ok": true,
"result": {
"message_id": 957,
"message_thread_id": 7,
"is_topic_message": true,
"reply_to_message": {
"message_id": 954,
"message_thread_id": 7
}
}
}
Result: Response correctly stays in topic 7 ✅
Logs Analysis
OpenClaw session logs correctly identify the topic:
"lane enqueue: lane=session:agent:main:telegram:group:<CHAT_ID>:topic:7"
However, the topic context is not propagated to skill responses or message tool calls.
Impact
- Skills cannot participate in threaded conversations - Limits utility in forum-style groups
- User experience degraded - Users must manually navigate to "general" to see skill responses
- Workaround required - Developers must bypass OpenClaw and use Telegram API directly
Root Cause Hypothesis
OpenClaw is not properly handling:
message_thread_id from incoming Telegram messages
- Propagation of thread context to skill execution environment
reply_to_message_id parameter when sending messages via Telegram channel
Workaround (Current Solution)
Skills must use Telegram Bot API directly instead of OpenClaw's message tools:
// Instead of OpenClaw message tool
await openclaw.tools.message.send({ session, text: "...", replyTo: message.id });
// Use Telegram API directly
await axios.post(`https://api.telegram.org/bot${BOT_TOKEN}/sendMessage`, {
chat_id: message.chat.id,
text: "...",
reply_to_message_id: message.id,
parse_mode: "Markdown"
});
Recommendations for Fix
- Propagate
message_thread_id from incoming Telegram messages to skill context
- Support
reply_to_message_id in Telegram channel message sending
- Add thread/topic awareness to OpenClaw's message routing system
- Update documentation with examples for topic-aware skill development
Reproduction Steps
- Create a Telegram supergroup with topics enabled
- Configure OpenClaw with topic settings
- Create a simple skill that responds to a command
- Invoke the skill from within a topic thread
- Observe response appears in "general" instead of the thread
Related Issues
Additional Context
This bug significantly impacts the usability of OpenClaw in community/forum settings where threaded conversations are essential. The workaround (direct Telegram API calls) adds complexity and reduces portability of skills across different channels.
Status: Confirmed bug with working workaround
Priority: High (breaks core functionality in forum-style groups)
Assignee: OpenClaw Telegram channel maintainer
Summary
OpenClaw fails to properly support Telegram topic/thread replies for skills and the message tool. Responses are always sent to the "general" topic instead of the correct thread, even when
replyToparameters are used. The issue can be bypassed by using the Telegram Bot API directly, confirming this is an OpenClaw bug.Environment
Configuration
openclaw.jsonTelegram section (anonymized):Problem Description
When a skill or agent attempts to reply to a message in a Telegram topic/thread, the response is incorrectly routed to the "general" topic instead of staying in the same thread.
Expected Behavior
openclaw.tools.message.send()withreplyToparameter should respect thread contextreply_to_message_idshould propagate through OpenClawActual Behavior
messagetool withreplyToparameter ignores thread contextEvidence and Testing
1. Skill Return Text (FAILS)
Code:
Result: Response goes to "general" topic ❌
2. Message Tool with replyTo (FAILS)
Code:
Result: Response goes to "general" topic ❌
3. Telegram Bot API Direct Call (WORKS)
Code:
Response from Telegram API:
{ "ok": true, "result": { "message_id": 957, "message_thread_id": 7, "is_topic_message": true, "reply_to_message": { "message_id": 954, "message_thread_id": 7 } } }Result: Response correctly stays in topic 7 ✅
Logs Analysis
OpenClaw session logs correctly identify the topic:
However, the topic context is not propagated to skill responses or message tool calls.
Impact
Root Cause Hypothesis
OpenClaw is not properly handling:
message_thread_idfrom incoming Telegram messagesreply_to_message_idparameter when sending messages via Telegram channelWorkaround (Current Solution)
Skills must use Telegram Bot API directly instead of OpenClaw's message tools:
Recommendations for Fix
message_thread_idfrom incoming Telegram messages to skill contextreply_to_message_idin Telegram channel message sendingReproduction Steps
Related Issues
Additional Context
This bug significantly impacts the usability of OpenClaw in community/forum settings where threaded conversations are essential. The workaround (direct Telegram API calls) adds complexity and reduces portability of skills across different channels.
Status: Confirmed bug with working workaround
Priority: High (breaks core functionality in forum-style groups)
Assignee: OpenClaw Telegram channel maintainer