openclaw - 💡(How to fix) Fix [Bug]: Telegram Forum Topic Delivery Silently Fails [5 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#77248Fetched 2026-05-05 05:50:47
View on GitHub
Comments
5
Participants
2
Timeline
7
Reactions
2
Timeline (top)
commented ×5closed ×1referenced ×1

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.

Error Message

  • No error is logged
  • No error logged

Root Cause

Suspected Root Cause

Fix Action

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.

Code Example

telegram sendMessage ok chat=XXXXXXXXXX message=7142
telegram sendMessage ok chat=XXXXXXXXXX message=7143

---

message(action="send", channel="telegram", target="-100XXXXXXXXXX", threadId="XXXXX", message="...")

---

{
  "status": "done",
  "deliveryContext": {
    "channel": "telegram",
    "to": "telegram:-100XXXXXXXXXX",
    "accountId": "default",
    "threadId": XXXXX
  },
  "runtimeMs": 25442
}
RAW_BUFFERClick to expand / collapse

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

  1. Configure a Telegram forum group (supergroup with topics enabled)
  2. Send a message to a topic thread in that group
  3. Wait for the assistant to generate a response
  4. 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

  1. DMs work perfectly — same bot, same gateway, same time period
  2. Manual message tool works — topic delivery via explicit tool call succeeds
  3. Automatic delivery is skipped — the step between response generation and sendMessage is failing silently
  4. 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:

  1. Response generation (works)
  2. Session completion marking (works)
  3. 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.

extent analysis

TL;DR

The issue can be worked around by manually specifying the target and threadId parameters when sending messages to Telegram forum topics.

Guidance

  • Verify that the deliveryContext in the session metadata contains the correct threadId for the Telegram forum topic, as shown in the provided session metadata example.
  • Check the code responsible for sending messages to Telegram forum topics to ensure it correctly handles the threadId parameter and makes the sendMessage API call.
  • Use the message tool with explicit target and threadId parameters to test if the issue is specific to the automatic delivery process.
  • Investigate the routing logic between response generation and sendMessage API call to identify why the delivery is being skipped silently.

Example

No code snippet is provided as the issue does not contain enough information about the specific code responsible for sending messages to Telegram forum topics.

Notes

The issue seems to be specific to Telegram forum topics and does not affect direct messages. The threadId is correctly populated in the session metadata, but the delivery never occurs.

Recommendation

Apply the workaround by manually specifying the target and threadId parameters when sending messages to Telegram forum topics, as this has been shown to work in the provided example. This will ensure that messages are delivered correctly until the root cause of the issue can be identified and fixed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING