openclaw - ✅(Solved) Fix [Bug]: ## Feishu channel `message:sent` hook not triggering [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#72125Fetched 2026-04-27 05:34:30
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×2closed ×1commented ×1cross-referenced ×1

Feishu message:sent hook does not fire for normal conversation replies, only triggers on system error messages

Error Message

Feishu message:sent hook does not fire for normal conversation replies, only triggers on system error messages 4. Only system error messages (e.g., "llm request failed") trigger the hook

  • Only system error messages (e.g., "llm request failed") trigger message:sentgger whenever the bot sends a message to the user
  • Only system error messages (e.g., "llm request failed") trigger message:sent

Root Cause

Feishu message:sent hook does not fire for normal conversation replies, only triggers on system error messages

Fix Action

Fixed

PR fix notes

PR #72138: fix(feishu): emit sent hooks for normal replies

Description (problem / solution / changelog)

Problem

Feishu normal conversation replies are sent by createFeishuReplyDispatcher. Scripts listening for internal message:sent do not fire after those replies, so Feishu workflows that depend on successful outbound messages miss normal bot responses.

Root cause

Feishu normal conversation replies bypass the shared outbound delivery path in src/infra/outbound/deliver.ts, where canonical sent-message hook emission already happens. The custom Feishu dispatcher sent text, card, media, and streaming-card replies directly without mirroring successful or failed delivery into sent hooks.

Complete fix boundary

  • Emit canonical plugin message_sent and internal message:sent from the Feishu normal reply dispatcher when hooks or a routed session key are available.
  • Cover the visible normal-reply send branches in that dispatcher: plain text, structured/chunked card text, media-only/media-after-text, streaming card finalization, and delivery failures.
  • Include the finalized streaming-card messageId in sent hooks, and avoid emitting a false failure for the delivered streaming text when only companion media delivery fails.
  • Pass routed session key and group mirror metadata from both Feishu conversation entry paths: active broadcast fanout and normal routed agent dispatch.

What intentionally did not change

  • Core outbound delivery was not changed; other channels already use the generic sent-hook path or have separate surfaces.
  • Feishu Drive/comment reply flows were not changed because #72125 reports normal Feishu bot conversation replies, and comment replies are a different inbound/outbound surface.
  • Internal block chunks remain suppressed unless the streaming-card fallback consumes them, preserving the existing dispatcher behavior.

Tests run

  • pnpm test extensions/feishu/src/reply-dispatcher.test.ts extensions/feishu/src/bot.test.ts extensions/feishu/src/bot.broadcast.test.ts extensions/feishu/src/monitor.bot-menu.test.ts extensions/feishu/src/monitor.card-action.test.ts extensions/feishu/src/monitor.reply-once.lifecycle.test.ts extensions/feishu/src/monitor.broadcast.reply-once.lifecycle.test.ts
  • pnpm tsgo:extensions
  • pnpm tsgo:test:extensions
  • pnpm lint --threads=8
  • pnpm exec oxfmt --check extensions/feishu/src/reply-dispatcher.ts extensions/feishu/src/reply-dispatcher.test.ts extensions/feishu/src/bot.ts extensions/feishu/src/streaming-card.ts
  • pnpm check:changed
  • git diff --check -- . ':!node_modules'

Linked issue

Fixes #72125

Changed files

  • extensions/feishu/src/bot.ts (modified, +6/-0)
  • extensions/feishu/src/reply-dispatcher.test.ts (modified, +207/-2)
  • extensions/feishu/src/reply-dispatcher.ts (modified, +247/-97)
  • extensions/feishu/src/streaming-card.ts (modified, +4/-0)
RAW_BUFFERClick to expand / collapse

Bug type

BUG

Beta release blocker

No

Summary

Feishu message:sent hook does not fire for normal conversation replies, only triggers on system error messages

Steps to reproduce

  1. Configure a message:sent hook in a Feishu channel
  2. Send a normal message to the bot in Feishu
  3. The bot responds normally, but the hook does not fire
  4. Only system error messages (e.g., "llm request failed") trigger the hook

Expected behavior

message:sent should tri- Normal conversation replies do NOT trigger message:sent

  • Only system error messages (e.g., "llm request failed") trigger message:sentgger whenever the bot sends a message to the user

Actual behavior

  • Normal conversation replies do NOT trigger message:sent
  • Only system error messages (e.g., "llm request failed") trigger message:sent

OpenClaw version

2026.4.24

Operating system

macos 26

Install method

No response

Model

minimaxM2.7

Provider / routing chain

Feishu message → gateway → message:received → agent → message:sent → hook

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The message:sent hook may need to be configured to trigger on normal conversation replies, not just system error messages.

Guidance

  • Review the Feishu channel configuration to ensure the message:sent hook is set up correctly to capture normal conversation replies.
  • Verify that the hook is not explicitly filtered to only trigger on system error messages.
  • Check the documentation for the message:sent hook to see if there are any specific requirements or settings for triggering on normal conversation replies.
  • Test the hook with different types of messages to see if it triggers as expected.

Notes

The issue may be related to the specific configuration of the Feishu channel or the message:sent hook, and further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Review and update the message:sent hook configuration to ensure it triggers on normal conversation replies, as the current setup seems to only capture system error messages.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

message:sent should tri- Normal conversation replies do NOT trigger message:sent

  • Only system error messages (e.g., "llm request failed") trigger message:sentgger whenever the bot sends a message to the user

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: ## Feishu channel `message:sent` hook not triggering [1 pull requests, 1 comments, 2 participants]