-
Notifications
You must be signed in to change notification settings - Fork 152
watch.subscribe can report group link-preview messages as chat_id=0 DM-shaped payloads #118
Copy link
Copy link
Open
Labels
P1Urgent regression or broken agent/channel workflow affecting real users now.Urgent regression or broken agent/channel workflow affecting real users now.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm 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-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.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.impact:message-lossThis issue is about lost, duplicated, misrouted, or suppressed channel messages.This issue is about lost, duplicated, misrouted, or suppressed channel messages.impact:securityThis issue is about security boundaries, credentials, authz, sandboxing, or sensitive data.This issue is about security boundaries, credentials, authz, sandboxing, or sensitive data.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Metadata
Metadata
Assignees
Labels
P1Urgent regression or broken agent/channel workflow affecting real users now.Urgent regression or broken agent/channel workflow affecting real users now.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm 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-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.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.impact:message-lossThis issue is about lost, duplicated, misrouted, or suppressed channel messages.This issue is about lost, duplicated, misrouted, or suppressed channel messages.impact:securityThis issue is about security boundaries, credentials, authz, sandboxing, or sensitive data.This issue is about security boundaries, credentials, authz, sandboxing, or sensitive data.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
watch.subscribecan emit a malformed notification for an iMessage group link-preview message: the live watch payload loses the group conversation metadata and reports the event as a DM-likechat_id=0payload, whilemessages.historyfor the same message GUID returns the correct group metadata.This can cause downstream consumers to route replies to the sender DM unless they add their own fail-closed recovery guard.
Observed watch payload shape
For a group message containing a URL plus text, the OpenClaw monitor received an event equivalent to:
{ "chat_id": 0, "chat_guid": "", "chat_identifier": "", "is_group": false, "sender": "<redacted account/handle>", "text": "https://example.invalid/...\n<message text>", "guid": "<redacted guid>" }The downstream log showed it as a direct-message route:
chatId=0 from=imessage:<sender>imessage:<sender>Same GUID via history
Querying the same message GUID through
messages.historyreturned the correct group record:{ "chat_id": 349, "chat_guid": "any;+;<redacted group>", "chat_identifier": "<redacted group identifier>", "is_group": true, "participants": ["<redacted>", "<redacted>"], "guid": "<same guid>" }All personal handles, message GUIDs, and group names are redacted here, but the mismatch was confirmed live on the same machine and same bridge.
Expected behavior
watch.subscribeshould emit the same stable conversation metadata asmessages.historyfor the same message GUID, especially:chat_idis_group: truefor group chatschat_guid/chat_identifierwhen availableIf a live watch event cannot resolve conversation metadata, it should expose a clear error/partial flag rather than emitting a DM-shaped payload.
Downstream mitigation
OpenClaw added a local mitigation to recover malformed
chat_id=0payloads by GUID before routing, and to drop fail-closed if recovery fails:Environment notes
imsg status --jsonreportedbridge_version: 2,v2_ready: true, andwatch.subscribe/messages.historyinrpc_methods.