fix(feifix(feishu): prevent isolated thread sessions in DMs (#44028) - #44058
Closed
iborazzi wants to merge 1 commit into
Closed
fix(feifix(feishu): prevent isolated thread sessions in DMs (#44028)#44058iborazzi wants to merge 1 commit into
iborazzi wants to merge 1 commit into
Conversation
Collaborator
Contributor
Author
|
Ah, I didn't catch that #36233 was already open for this. Thanks for letting me know, @alt-glitch! Glad to see the issue is being tracked and the fix is identical. Closing this one out. |
This was referenced Jun 11, 2026
This was referenced Jun 11, 2026
This was referenced Aug 3, 2026
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.
Description
Fixes an issue where a user sending a quoted reply (
引用回复) in a Feishu/Lark DM conversation is routed to an isolated session instead of the normal DM session, causing the agent to lose conversation context.Root Cause
When a user quotes/replies to a message in a Feishu DM, the Lark SDK populates
message.thread_id(ormessage.root_id). While this is correct for group threads, Feishu DMs do not support real threads. This causesbuild_session_key()to generate an isolated session key (e.g.,agent:main:feishu:dm:oc_xxx:om_yyy) instead of the main DM session key.Changes Made
chat_type == "p2p"in_process_inbound_messageto clear thethread_idwhen the message is from a direct message conversation.Fixes #44028