Skip to content

message tool: message_thread_id not passed for Telegram forum topic delivery #27560

@monkeyracer25

Description

@monkeyracer25

Bug

When using the message tool to send to a Telegram forum group topic, the message_thread_id is not included in the Telegram Bot API sendMessage call. All messages land in the General topic regardless of the target format used.

Reproduction

  1. Have a Telegram group with Forum Topics enabled
  2. Configure topics in openclaw.json with topic IDs
  3. Use the message tool with various target formats:
    • telegram:-100xxx:285
    • telegram:-100xxx:topic:285
  4. Message always arrives in General (topic 1)

Expected

Message should arrive in the specified topic (thread_id=285 in this case).

Workaround

Calling the Telegram Bot API directly with message_thread_id parameter works correctly:

curl -s "https://api.telegram.org/bot$TOKEN/sendMessage" \
  -d "chat_id=-100xxx" \
  -d "message_thread_id=285" \
  -d "text=test"

Environment

  • OpenClaw: 2026.2.25
  • macOS 26.3 (arm64)
  • Node 25.6.0
  • Bot has can_manage_topics: true
  • Group is a supergroup with is_forum: true

Notes

Inbound topic routing works correctly after enabling can_manage_topics — each topic creates its own session (topic:<id>). The issue is only with outbound delivery via the message tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked 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