-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Slack message sends can return ambiguous middlewareError, causing duplicate retries #83710
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.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: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-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.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
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.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: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-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.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
Slack
message(action="send")can return an ambiguous tool result such as:{ "details": {"status": "error", "middlewareError": true}, "isError": false }When this happens, the agent receives no Slack
messageId/ receipt and cannot tell whether the message was actually delivered. In a live Slack channel this led to visible duplicate assistant replies because the agent treated the tool result as a failed send and retried.Environment
openclaw 2026.5.12Observed behavior
During a Slack channel conversation, several
messagetool calls returned middleware errors without receipts, while the Slack channel showed repeated/near-duplicate visible assistant messages.Redacted local session evidence:
For comparison, normal successful Slack sends in the same session return a receipt like:
{ "result": { "receipt": { "primaryPlatformMessageId": "1779124612.540739", "platformMessageIds": ["1779124612.540739"], "parts": [{"platformMessageId": "1779124612.540739", "kind": "text"}] }, "messageId": "1779124612.540739", "channel": "slack" } }There was also an earlier related Slack durable-send style error in the same session logs:
Expected behavior
For Slack sends, the tool result should make retry safety explicit:
isError: true.unknown_send_state(or similar) plus enough reconciliation data for the agent/runtime to check Slack before retrying.Actual behavior
message(action="send")returnedstatus:error+middlewareError:truewhileisError:false, with no platform receipt. This created an ambiguous state. The agent retried and duplicate messages became visible in Slack.Impact
Suggested fix
delivered,definitely_failed, orunknown.unknown, expose an explicit retry-safety flag such asretrySafe: false/sendState: "unknown".reconcileUnknownSendsupport for durable sends.message(action="send")so retry attempts can be de-duplicated by the runtime/plugin.I am filing this with private channel content redacted; I can provide more local session metadata if useful.