Repository navigation
Description
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
In OpenClaw 2026.5.28, Discord reply metadata is finalized into ReplyToId, ReplyToBody, and ReplyToSender, but those fields are not exposed to before_dispatch plugin hooks.
Steps to reproduce
- Install or write a plugin that registers a
before_dispatchhook and logs the hookeventandctx. - Configure Discord as a channel.
- Send a Discord message that replies to an earlier Discord message.
- Inspect the
before_dispatchhook payload for the inbound replied message.
Expected behavior
The before_dispatch hook should expose the Discord reply target metadata, either as replyToId / replyToBody / replyToSender on the hook event/context or through an equivalent documented field.
This is expected because OpenClaw 2026.5.28 already derives Discord quote metadata and finalizes it into inbound context fields:
ReplyToIdReplyToBodyReplyToSender
Actual behavior
The finalized inbound context contains the reply metadata, but the before_dispatch hook boundary drops it.
Observed in the published 2026.5.28 package:
dist/inbound-context-CbkangX1.jsmapsSupplementalContext.quoteintoReplyToId,ReplyToBody, andReplyToSender.dist/message-hook-mappers-DBnpM4vz.jsderiveInboundMessageHookContext(...)does not include those fields.dist/dispatch-DphqeP-y.jscallshookRunner.runBeforeDispatch(...)without including those fields in either the event or context object.
As a result, plugins cannot reliably implement reply-aware Discord commands through the public before_dispatch hook API.
OpenClaw version
2026.5.28
Operating system
Ubuntu 24.04
Install method
npm global
Model
Not model-dependent; the issue occurs before model dispatch.
Provider / routing chain
Not provider-dependent; reproduced at the Discord channel/plugin hook boundary before model routing matters.
Additional provider/model setup details
NOT_ENOUGH_INFO
Logs, screenshots, and evidence
Published package inspection for OpenClaw 2026.5.28:
dist/inbound-context-CbkangX1.js:
ReplyToId: supplemental.quote?.id
ReplyToBody: supplemental.quote?.body
ReplyToSender: supplemental.quote?.sender
dist/message-hook-mappers-DBnpM4vz.js:
deriveInboundMessageHookContext(...) does not map ReplyToId, ReplyToBody, or ReplyToSender.
dist/dispatch-DphqeP-y.js:
hookRunner.runBeforeDispatch(...) event/context omit replyToId, replyToBody, and replyToSender.Impact and severity
Affected: plugin authors using before_dispatch to implement Discord reply-aware commands.
Severity: Medium. This blocks reply-aware command handling for plugins unless they use an undocumented workaround or patch OpenClaw/plugin internals.
Frequency: Always observed for this hook path in 2026.5.28 when relying on before_dispatch.
Consequence: Plugins cannot determine which Discord message was replied to, even though the channel/runtime has already resolved that metadata internally.
Additional information
A local workaround is to pass the Discord reply target through a channel-specific command marker before before_dispatch, but that requires patching the Discord plugin and should not be necessary if the hook API exposes the already-finalized reply metadata.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon May 31, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed May 31, 2026, 1:15 AM ET / 05:15 UTC.
Summary
Codex review failed: codex execution failed.
Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.
Ways to help us reproduce this
Next step
Review did not complete, so no work-lane recommendation was made.
Review details
Best possible solution:
Retry the Codex review after fixing the execution failure.
Do we have a high-confidence way to reproduce the issue?
Unclear. The review failed before ClawSweeper could establish a reproduction path.
Is this the best way to solve the issue?
Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.
AGENTS.md: unclear because the file could not be read completely.
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 51dee73a5d3e.
Label changes
Label changes:
issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.clawsweeper:needs-info: Current issue advisory state selects this label.Evidence reviewed
What I checked:
Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.fix(hooks): expose inbound reply metadata before dispatch
steipete commentedon Jun 1, 2026
Fixed on main by PR #88801, commit 9215984.
Proof:
fix(hooks): expose inbound reply metadata before dispatch
fix(hooks): expose inbound reply metadata before dispatch