Bug Description
Root-DM messages to the Hermes Telegram gateway no longer create new topics. Every reply from the root DM gets pinned back to whatever topic you were most recently talking in. Auto-topic-renaming also silently breaks when disable_topic_auto_rename is not explicitly set.
Previously, sending a new message from the root Telegram DM created a new topic, got auto-renamed to match the conversation after a turn, and had tool-call progress routed to that same topic. Now new root messages silently re-use the last active topic, breaking session isolation — you end up with two separate conversations tangled in one topic, or tool-call output showing up in a different topic than where you replied.
Steps to Reproduce
- Run Hermes gateway with Telegram enabled,
telegram.extra.disable_topic_auto_rename unset (defaults to false).
- Send a message from the Telegram root DM — a new topic is created (expected).
- Reply in that topic — it gets auto-renamed (may or may not work depending on flag state).
- Send a new message from the root DM again — instead of creating a fresh topic, the response appears in the topic from step 2.
Expected Behavior
A new root-DM message creates a new topic. After one turn in the new topic, the topic gets auto-renamed to match the conversation. Tool-call progress routes to whichever topic the conversation is in.
Actual Behavior
Root-DM messages no longer create new topics. Instead, _recover_telegram_topic_thread_id() pins them to the most recent topic, which breaks the expected root-DM → new-topic flow and makes auto-rename/tool-call routing behave incorrectly.
Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
Telegram
Debug Report
Unable to run `hermes debug share` at time of filing. Root cause is identified below with file paths and code references.
Operating System
CachyOS (Arch-based)
Python Version
3.11.15
Hermes Version
v2026.5.16-702-ga8cbcf1c8
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
The bug is in gateway/run.py. Commit ede47a54b added _recover_telegram_topic_thread_id() which routes incoming root-DM messages to the user's most recent topic instead of creating a new one. The revert is straightforward — git revert ede47a54b.
Proposed Fix (optional)
Revert commit ede47a54b. If the pinning behavior (routing root-DM replies to the current topic) is desired, make it opt-in via a config flag like telegram.extra.pin_root_dm_replies: true.
Are you willing to submit a PR for this?
Bug Description
Root-DM messages to the Hermes Telegram gateway no longer create new topics. Every reply from the root DM gets pinned back to whatever topic you were most recently talking in. Auto-topic-renaming also silently breaks when
disable_topic_auto_renameis not explicitly set.Previously, sending a new message from the root Telegram DM created a new topic, got auto-renamed to match the conversation after a turn, and had tool-call progress routed to that same topic. Now new root messages silently re-use the last active topic, breaking session isolation — you end up with two separate conversations tangled in one topic, or tool-call output showing up in a different topic than where you replied.
Steps to Reproduce
telegram.extra.disable_topic_auto_renameunset (defaults tofalse).Expected Behavior
A new root-DM message creates a new topic. After one turn in the new topic, the topic gets auto-renamed to match the conversation. Tool-call progress routes to whichever topic the conversation is in.
Actual Behavior
Root-DM messages no longer create new topics. Instead,
_recover_telegram_topic_thread_id()pins them to the most recent topic, which breaks the expected root-DM → new-topic flow and makes auto-rename/tool-call routing behave incorrectly.Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
Telegram
Debug Report
Operating System
CachyOS (Arch-based)
Python Version
3.11.15
Hermes Version
v2026.5.16-702-ga8cbcf1c8
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
The bug is in
gateway/run.py. Commitede47a54badded_recover_telegram_topic_thread_id()which routes incoming root-DM messages to the user's most recent topic instead of creating a new one. The revert is straightforward —git revert ede47a54b.Proposed Fix (optional)
Revert commit
ede47a54b. If the pinning behavior (routing root-DM replies to the current topic) is desired, make it opt-in via a config flag liketelegram.extra.pin_root_dm_replies: true.Are you willing to submit a PR for this?