-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Feishu Plugin Incorrectly Uses Reply Mode in Direct (DM) Chats #94922
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.bugSomething isn't workingSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
In Feishu (Lark) direct message (1:1 chat) scenarios, OpenClaw's built-in Feishu plugin incorrectly sends messages with replyToMessageId set, causing:
Steps to reproduce
Expected behavior
In direct/private chat (:direct: session key), messages should be sent as top-level messages without replyToMessageId, resulting in clean message display without "Reply to" labels.
Actual behavior
Messages are sent with replyToMessageId populated, causing:
OpenClaw version
2026.5.20
Operating system
ubuntu 24.04
Install method
npm globle
Model
kimi-coding
Provider / routing chain
openclaw (local gateway) -> feishu built-in plugin -> feishu API (lark-openapi)
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
Root Cause Analysis (Updated)
Initial Analysis: After investigating dist/channel-CCNshI3E.js and dist/conversation-id-CZogbv72.js, we suspected the issue was in resolveFeishuTopicAutoThreadAnchor being triggered by parentConversationId.
Key Discovery: The real trigger is blockStreaming: true (default). When block streaming is enabled, OpenClaw uses a streaming card delivery path that automatically sets replyToMessageId, causing the "Reply to" label. When blockStreaming: false, messages are sent via the direct path without reply anchoring.
This explains why patches to buildFeishuSendReplyAnchor and resolveFeishuTopicAutoThreadAnchor had no effect — the streaming card path bypasses these functions entirely.
Attempted Fixes
Code patches to channel-CCNshI3E.js (Attempt 1 & 2): Modified resolveFeishuTopicAutoThreadAnchor and buildFeishuSendReplyAnchor to detect direct chats. Result: No effect, confirming the reply anchor is set in the streaming layer, not the send action layer.
Configuration change (Working solution): Set "blockStreaming": false in channels.feishu config. Result: "Reply to" label disappears and message delivery is significantly faster.
Workaround (Verified)
Set blockStreaming: false in your OpenClaw configuration:
json
{
"channels": {
"feishu": {
"blockStreaming": false
}
}
}
Trade-off: Disabling block streaming may affect how large messages are rendered in Feishu, but for typical chat responses the impact is minimal.
Suggested Fix
The streaming card delivery path should respect chat type and not force reply mode for direct/private chats. The fix should be applied in the streaming/card delivery layer (not in buildFeishuSendReplyAnchor).
Additional Context
Regression: This issue occurred in older versions of OpenClaw, was previously fixed, and has now reappeared in version 2026.6.6. This suggests the bug may have been reintroduced during a recent refactoring of the streaming or card delivery path.
Related Code
dist/channel-CCNshI3E.js — buildFeishuSendReplyAnchor, resolveFeishuTopicAutoThreadAnchor, isFeishuGroupTopicSessionKey
dist/conversation-id-CZogbv72.js — parseFeishuConversationId
dist/send-Bpn2MIyC.js — sendReplyOrFallbackDirect, sendMessageFeishu