openclaw - ✅(Solved) Fix Bug: event.messages.push() on message:received has no effect [1 pull requests, 1 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#61432Fetched 2026-04-08 02:58:43
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Participants
Timeline (top)
labeled ×2cross-referenced ×1

event.messages.push() executes without error on message:received events but has no observable effect in any channel (webchat or Telegram), despite the docs stating messages is available to push messages to the user on all events.

Error Message

event.messages.push() executes without error on message:received events but has no observable effect in any channel (webchat or Telegram), despite the docs stating messages is available to push messages to the user on all events.

Root Cause

event.messages.push() executes without error on message:received events but has no observable effect in any channel (webchat or Telegram), despite the docs stating messages is available to push messages to the user on all events.

Fix Action

Fixed

PR fix notes

PR #61657: fix: forward message:received hook notices

Description (problem / solution / changelog)

Fixes #61432

Summary

  • run message:received internal hooks inside the existing async dispatch wrapper
  • forward any non-empty event.messages entries through the same additive notice path used for binding notices
  • add a regression test covering event.messages.push() on message:received

Root cause

dispatchReplyFromConfig() created and triggered the internal hook event, but never consumed event.messages afterward, so pushes were silently dropped.

Verification

  • targeted Vitest run against src/auto-reply/reply/dispatch-from-config.test.ts passed using a temporary isolated config wrapper because the repo's shared non-isolated runner is broken in this checkout

Changed files

  • src/auto-reply/reply/dispatch-from-config.test.ts (modified, +61/-0)
  • src/auto-reply/reply/dispatch-from-config.ts (modified, +19/-9)
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

event.messages.push() executes without error on message:received events but has no observable effect in any channel (webchat or Telegram), despite the docs stating messages is available to push messages to the user on all events.

Steps to reproduce

  1. Create a managed hook at ~/.openclaw/hooks/session-status/
  2. HOOK.md declares events: ["message:received"]
  3. handler.ts calls event.messages.push("test") unconditionally
  4. Enable hook: openclaw hooks enable session-status
  5. Send a message to any agent via webchat or Telegram

Expected behavior

Per docs, messages is available on all events and pushing to it sends a message to the user. Expected "test" to appear in the conversation.

Actual behavior

[debug] type=message action=received [debug] pushing message now [debug] pushed

No message appears in webchat or Telegram. Push executes silently with no effect.

OpenClaw version

2026.4.2 (d74a122)

Operating system

macOS

Install method

npm global

Model

anthropic/claude-sonnet-4-6

Provider / routing chain

anthropic/claude-sonnet-4-6

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 issue might be due to the event.messages.push() method not being properly handled in the message:received event, and a workaround could be to check the event documentation for specific requirements or limitations.

Guidance

  • Review the OpenClaw documentation for the message:received event to ensure that event.messages.push() is supported and properly configured.
  • Verify that the handler.ts file is correctly implemented and that the event.messages.push("test") line is executed without errors.
  • Check the OpenClaw version (2026.4.2) for any known issues or limitations related to the message:received event and event.messages.push() method.
  • Test the event.messages.push() method with different events or scenarios to see if the issue is specific to the message:received event.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The issue might be related to the specific OpenClaw version or the message:received event implementation, and further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Check the OpenClaw documentation and test the event.messages.push() method with different events or scenarios to identify any specific requirements or limitations.

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

Per docs, messages is available on all events and pushing to it sends a message to the user. Expected "test" to appear in the conversation.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING