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
- Create a Telegram group and enable Topics.
- Add Hermes bot to the group and make it an Admin.
- 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:
- Add logic to automatically use message_thread_id=1 (General Topic) when sending to a group with Topics enabled.
- Improve the documentation on how to correctly format targets for specific Threads/Topics in send_message.
- Handle stale chat metadata more gracefully without requiring a full gateway restart.
Are you willing to submit a PR for this?
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
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.
Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
Telegram
Debug Report
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:
Are you willing to submit a PR for this?