hermes - 💡(How to fix) Fix [Bug]: Telegram Send Failed: "Message thread not found" when sending to Groups with Topics enabled [5 pull requests]

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…

Error Message

Hermes gateway fails to send messages to Telegram groups that have Topics enabled, even when the bot is an Admin and the chat ID is valid. The send_message tool returns a Message thread not found error. The message fails to send with the following error:

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

Code Example

📋 Report: https://paste.rs/8vSXD
📋 agent.log: https://paste.rs/U7BNq
📋 gateway.log: https://paste.rs/IWb5V

---
RAW_BUFFERClick to expand / collapse

Bug Description

Hermes gateway fails to send messages to Telegram groups that have Topics enabled, even when the bot is an Admin and the chat ID is valid. The send_message tool returns a Message thread not found error.

Steps to Reproduce

  1. Create a Telegram group and enable Topics.
  2. Add Hermes bot to the group and make it an Admin.
  3. Use the agent to send a message to the group via the send_message tool.

Expected Behavior

Hermes should be able to send messages to the default "General" topic, or allow the user to explicitly specify the Thread ID when targeting a chat.

Actual Behavior

The message fails to send with the following error: Telegram send failed: Message thread not found

Note: Hermes can correctly list the Topics in the available targets (e.g., telegram:Group / topic 1), but fails to send the message despite the topic being visible.

Restart Required: Disabling Topics in the group settings does not immediately fix the issue. A full gateway restart (hermes gateway restart) and rejoining group is required to refresh the chat metadata.

  • Reply vs Send: The bot works perfectly when replying to a message (mention), but fails when trying to send a new message independently.

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

Telegram

Debug Report

📋 Report: https://paste.rs/8vSXD
📋 agent.log: https://paste.rs/U7BNq
📋 gateway.log: https://paste.rs/IWb5V

Operating System

Ubuntu 24

Python Version

No response

Hermes Version

0.13.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

Suggestion:

  1. Add logic to automatically use message_thread_id=1 (General Topic) when sending to a group with Topics enabled.
  2. Improve the documentation on how to correctly format targets for specific Threads/Topics in send_message.
  3. Handle stale chat metadata more gracefully without requiring a full gateway restart.

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

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

hermes - 💡(How to fix) Fix [Bug]: Telegram Send Failed: "Message thread not found" when sending to Groups with Topics enabled [5 pull requests]