Bug Report: Telegram Forum Topic Delivery Silently Fails
Bug Type
Behavior bug (incorrect output/state without crash)
Summary
Responses to Telegram forum topic threads are silently dropped. The LLM generates a response, the session marks as "done", but no sendMessage API call is ever attempted. Direct messages to the same bot work correctly.
Environment
- OpenClaw Version: 2026.5.2
- OS: Linux (Oracle Cloud ARM)
- Node.js: v24.13.0
- Telegram Channel: Enabled with forum group configured
Steps to Reproduce
- Configure a Telegram forum group (supergroup with topics enabled)
- Send a message to a topic thread in that group
- Wait for the assistant to generate a response
- Observe that no response is delivered to Telegram
Expected Behavior
The generated response should be delivered to the Telegram topic thread.
Actual Behavior
- Session processes the message and generates a response (visible in transcript)
- Session status changes to "done"
- No
sendMessage API call is logged (neither success nor failure)
- Response is never delivered to Telegram
- No error is logged
Evidence from Logs
DM delivery works (sendMessage logged):
telegram sendMessage ok chat=XXXXXXXXXX message=7142
telegram sendMessage ok chat=XXXXXXXXXX message=7143
Topic delivery fails silently (no sendMessage logged):
- Session transcript shows assistant response was generated
- Session status shows "done" with
runtimeMs indicating successful completion
- No corresponding
sendMessage ok or sendMessage failed log entry
- No error logged
Workaround
Using the message tool with explicit target and threadId parameters works:
message(action="send", channel="telegram", target="-100XXXXXXXXXX", threadId="XXXXX", message="...")
This confirms the Telegram API itself is not the issue.
Key Observations
- DMs work perfectly — same bot, same gateway, same time period
- Manual message tool works — topic delivery via explicit tool call succeeds
- Automatic delivery is skipped — the step between response generation and sendMessage is failing silently
- No errors logged — makes debugging difficult; the session just completes without delivery
Suspected Root Cause
The delivery routing for forum topic sessions appears to be silently failing or being skipped somewhere between:
- Response generation (works)
- Session completion marking (works)
- sendMessage API call (never reached)
The deliveryContext in the session metadata shows correct threadId, so the routing info is present but not being used.
Additional Context
- Forum topics use
message_thread_id parameter in Telegram API
- The same group's General topic and regular messages may behave differently
- Issue persists across gateway restarts
- Multiple topics affected (not specific to one topic ID)
Session Metadata Example
{
"status": "done",
"deliveryContext": {
"channel": "telegram",
"to": "telegram:-100XXXXXXXXXX",
"accountId": "default",
"threadId": XXXXX
},
"runtimeMs": 25442
}
The threadId is correctly populated, but delivery never occurs.
Bug Report: Telegram Forum Topic Delivery Silently Fails
Bug Type
Behavior bug (incorrect output/state without crash)
Summary
Responses to Telegram forum topic threads are silently dropped. The LLM generates a response, the session marks as "done", but no
sendMessageAPI call is ever attempted. Direct messages to the same bot work correctly.Environment
Steps to Reproduce
Expected Behavior
The generated response should be delivered to the Telegram topic thread.
Actual Behavior
sendMessageAPI call is logged (neither success nor failure)Evidence from Logs
DM delivery works (sendMessage logged):
Topic delivery fails silently (no sendMessage logged):
runtimeMsindicating successful completionsendMessage okorsendMessage failedlog entryWorkaround
Using the
messagetool with explicittargetandthreadIdparameters works:This confirms the Telegram API itself is not the issue.
Key Observations
Suspected Root Cause
The delivery routing for forum topic sessions appears to be silently failing or being skipped somewhere between:
The
deliveryContextin the session metadata shows correctthreadId, so the routing info is present but not being used.Additional Context
message_thread_idparameter in Telegram APISession Metadata Example
{ "status": "done", "deliveryContext": { "channel": "telegram", "to": "telegram:-100XXXXXXXXXX", "accountId": "default", "threadId": XXXXX }, "runtimeMs": 25442 }The
threadIdis correctly populated, but delivery never occurs.