Bug type
Regression (worked before, now fails)
Summary
My Feishu channel in OpenClaw is unable to send any replies back to the user. The system successfully receives messages from Feishu, dispatches them to the correct agent, and the agent processes the request and generates a response (visible in the OpenClaw dashboard and session files). However, the final reply is never sent to Feishu.
The most critical log entry, which appears consistently after every attempt, is:
feishu[media-manager]: dispatch complete (queuedFinal=false, replies=0)
This indicates that the reply-dispatcher is concluding that there are no replies to send, even though the agent has generated one. This issue is specific to the Feishu channel, as my WeCom (企业微信) channel works perfectly fine.
Steps to reproduce
- Configure a Feishu channel with a valid
appId and appSecret.
- Bind the Feishu account to an agent (e.g.,
media-manager).
- Send a message to the Feishu bot from a user.
- Observe that the message is received by OpenClaw and processed by the agent.
- Observe that no reply is sent back to the user in Feishu.
- Check the OpenClaw logs and find the
dispatch complete (queuedFinal=false, replies=0) entry.
Expected behavior
We have exhaustively debugged this issue and can rule out the following causes:
- Configuration Errors: We completely reset the
channels.feishu configuration to a minimal, known-good state. The issue persists.
- Feishu App Permissions: We have verified that the Feishu app has all necessary permissions, including
contact:contact.base:readonly and all im:message scopes. The issue persists.
- LLM Output Formatting:
- We initially suspected that the LLM's output (e.g.,
" [[reply_to_current]] Hi") was causing a parsing failure due to a leading space.
- To fix this, we added a hard rule to the agent's
AGENTS.md to ensure no leading spaces.
- When that failed, we added a critical, hard-coded rule to the agent's
SOUL.md to never use [[reply_to_current]] or any other reply tags, forcing it to output only plain text.
- Even with these strict constraints, the
replies=0 issue persists, proving the problem is not with the LLM's output format.
- Network or API Endpoint Issues:
- We deliberately set an invalid
domain in the Feishu config ("invalid.domain"). This correctly produced a TypeError: Invalid URL error in the logs.
- This test proves that the message processing logic is attempting to reach the API endpoint, but it's failing before the
sendMessageFeishu function is ever called.
- Direct Code Instrumentation:
- We copied the source code of the built-in Feishu plugin into
~/.openclaw/extensions/feishu-debug.
- We added multiple
console.log statements to the sendMessageFeishu function in send.ts.
- After restarting, we confirmed that none of our custom logs were ever printed, definitively proving that the
sendMessageFeishu function is never being called by the reply-dispatcher.
Actual behavior
Conclusion
The root cause of this issue is a bug within the OpenClaw Feishu plugin's reply dispatch logic.
The reply-dispatcher for the Feishu channel is incorrectly determining that there are no replies to send (replies=0), even when the agent has successfully generated a valid response. This happens before the core sendMessageFeishu function is ever invoked.
The fact that the WeCom channel works correctly suggests this is a channel-specific implementation bug, not a core OpenClaw framework issue.
Suggested Next Steps for Developers
Please investigate the createFeishuReplyDispatcher function and its surrounding logic in the Feishu plugin. The problem likely lies in how it parses the agent's final ReplyPayload and decides whether to add it to the queue of messages to be delivered. The logic is erroneously discarding all replies.
OpenClaw version
2026.3.2
Operating system
Linux
Install method
npm
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response
Bug type
Regression (worked before, now fails)
Summary
My Feishu channel in OpenClaw is unable to send any replies back to the user. The system successfully receives messages from Feishu, dispatches them to the correct agent, and the agent processes the request and generates a response (visible in the OpenClaw dashboard and session files). However, the final reply is never sent to Feishu.
The most critical log entry, which appears consistently after every attempt, is:
feishu[media-manager]: dispatch complete (queuedFinal=false, replies=0)This indicates that the
reply-dispatcheris concluding that there are no replies to send, even though the agent has generated one. This issue is specific to the Feishu channel, as my WeCom (企业微信) channel works perfectly fine.Steps to reproduce
appIdandappSecret.media-manager).dispatch complete (queuedFinal=false, replies=0)entry.Expected behavior
We have exhaustively debugged this issue and can rule out the following causes:
channels.feishuconfiguration to a minimal, known-good state. The issue persists.contact:contact.base:readonlyand allim:messagescopes. The issue persists." [[reply_to_current]] Hi") was causing a parsing failure due to a leading space.AGENTS.mdto ensure no leading spaces.SOUL.mdto never use[[reply_to_current]]or any other reply tags, forcing it to output only plain text.replies=0issue persists, proving the problem is not with the LLM's output format.domainin the Feishu config ("invalid.domain"). This correctly produced aTypeError: Invalid URLerror in the logs.sendMessageFeishufunction is ever called.~/.openclaw/extensions/feishu-debug.console.logstatements to thesendMessageFeishufunction insend.ts.sendMessageFeishufunction is never being called by thereply-dispatcher.Actual behavior
Conclusion
The root cause of this issue is a bug within the OpenClaw Feishu plugin's reply dispatch logic.
The
reply-dispatcherfor the Feishu channel is incorrectly determining that there are no replies to send (replies=0), even when the agent has successfully generated a valid response. This happens before the coresendMessageFeishufunction is ever invoked.The fact that the WeCom channel works correctly suggests this is a channel-specific implementation bug, not a core OpenClaw framework issue.
Suggested Next Steps for Developers
Please investigate the
createFeishuReplyDispatcherfunction and its surrounding logic in the Feishu plugin. The problem likely lies in how it parses the agent's finalReplyPayloadand decides whether to add it to the queue of messages to be delivered. The logic is erroneously discarding all replies.OpenClaw version
2026.3.2
Operating system
Linux
Install method
npm
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response