openclaw - 💡(How to fix) Fix [Bug]: why hook handler can not capture message:sent event [3 comments, 3 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#52144Fetched 2026-04-08 01:15:10
View on GitHub
Comments
3
Participants
3
Timeline
5
Reactions
0
Author
Timeline (top)
commented ×3labeled ×2

Feishu channel, using hooks can only capture message:received and message:preprocessed, but not message:sent.

Root Cause

Feishu channel, using hooks can only capture message:received and message:preprocessed, but not message:sent.

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Summary

Feishu channel, using hooks can only capture message:received and message:preprocessed, but not message:sent.

Steps to reproduce

  1. openclaw version: OpenClaw 2026.3.13 (61d171a)
  2. Add a simple Hook, capture message:receive, message:preprocessed, and message:sent

Expected behavior

message:receive, message:preprocessed, and message:sent can all be captured.

Actual behavior

can only capture message:received and message:preprocessed, but not message:sent.

OpenClaw version

OpenClaw 2026.3.13 (61d171a)

Operating system

Ubuntu 20.04

Install method

npm global

Model

kimi 2.5

Provider / routing chain

openclaw->kimi

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

Fix Plan

To fix the issue of not being able to capture the message:sent event, we need to update the hook configuration.

Step-by-Step Solution

  1. Check Hook Configuration: Verify that the hook is correctly configured to capture the message:sent event.
  2. Update Hook Code: Ensure the hook code is correctly handling the message:sent event. Example:
    const hook = {
      events: ['message:received', 'message:preprocessed', 'message:sent'],
      handler: (event) => {
        if (event.type === 'message:sent') {
          // Handle message:sent event
          console.log('Message sent:', event);
        }
      }
    };
  3. Register Hook: Register the hook with the correct events.
    openclaw.registerHook(hook);

Verification

To verify the fix, capture the message:sent event and log it to the console.

if (event.type === 'message:sent') {
  console.log('Message sent:', event);
}

Check the logs to ensure the message:sent event is being captured.

Extra Tips

  • Ensure the hook is registered correctly and the events are specified in the hook configuration.
  • Check the OpenClaw documentation for any specific requirements for capturing the message:sent event.
  • Verify that the message:sent event is being triggered correctly in the OpenClaw workflow.

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:receive, message:preprocessed, and message:sent can all be captured.

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 - 💡(How to fix) Fix [Bug]: why hook handler can not capture message:sent event [3 comments, 3 participants]