-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
message_sending hooks bypassed when streaming is enabled #61550
Copy link
Copy link
Closed as not planned
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Description
When Telegram channel has
streaming: "partial"configured inopenclaw.json, themessage_sendingplugin hook never fires for the final delivered message.Steps to Reproduce
message_sendinghook viaapi.on("message_sending", handler, { priority: 100 })streaming: "partial"(or"full") inopenclaw.jsonmessage_sendinghook handler is never calledExpected Behavior
The
message_sendinghook should fire for every outgoing message, regardless of whether streaming is enabled or not.Actual Behavior
With streaming enabled, the final message delivery goes through:
createLaneTextDeliverer→tryUpdatePreviewForLane→editPreview(TelegrameditMessageText)This path completely bypasses
deliverReplies()wheremessage_sendinghooks are invoked viaapplyMessageSendingHook().The hooks only fire when
streaming: "off"is set, because then messages go throughdeliverReplies()→getGlobalHookRunner()→hasHooks("message_sending")→runMessageSending().Workaround
Set
channels.telegram.streaming: "off"inopenclaw.json. This forces all messages through thedeliverReplies()path where hooks work correctly.Environment
Impact
Any plugin relying on
message_sendinghooks (e.g., content filtering, URL validation, message transformation) silently fails when streaming is enabled. The plugin loads and registers correctly, but the hook is never invoked.