fix(feishu): stop using root_id as thread_id for DM replies - #29467
Closed
nasymonk wants to merge 1 commit into
Closed
fix(feishu): stop using root_id as thread_id for DM replies#29467nasymonk wants to merge 1 commit into
nasymonk wants to merge 1 commit into
Conversation
Feishu sets root_id on ordinary inline DM replies, which should stay in the main chat session rather than spawning a new thread-keyed session. Only use the explicit thread_id attribute (forum topics) for session routing. root_id is still preserved as reply context via reply_to_message_id. Fixes #29466
Collaborator
11 tasks
1 task
GodJones
pushed a commit
to GodJones/hermes-agent
that referenced
this pull request
Aug 8, 2026
Feishu sets root_id on ordinary inline replies, which must stay in the main chat session. Using it as thread_id spawned a new thread-keyed session and bound replies to the quoted message. Refs: NousResearch#29466 (open), PR NousResearch#29467 (closed, unmerged). Local-only fix on a branch so it survives updates via rebase origin/main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
root_idas a fallbackthread_idfor inbound messagesroot_idon ordinary inline DM replies (not just forum topics), which causes reply messages to be routed to a separate thread-keyed sessionroot_idavailable as reply context viareply_to_message_id(unchanged)Problem
When a user replies to a specific message in a Feishu DM, the bot's typing indicator appears in the main chat, but the actual response is posted as a thread reply — invisible in the main chat window.
Root cause:
thread_idfalls back toroot_id, and Feishu setsroot_idfor all inline replies. This changes the session key fromdm:oc_xxxtodm:oc_xxx:om_xxx, causing the response to be sent withreply_in_thread=True.Fix
Only use the explicit
thread_idattribute (Feishu forum topics) for session routing. Removeroot_idfrom thethread_idfallback chain.Fixes #29466