-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Sub-agent completion auto-announce silently fails in Discord group chats (source_reply_delivery_mode_mismatch) #86232
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.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.
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.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.
Type
Fields
Priority
None yet
Description
When a sub-agent completes its work and OpenClaw tries to auto-announce the completion back to the requester session in a Discord group chat (/channel), the delivery silently fails with
source_reply_delivery_mode_mismatch.This causes the main agent (and the user) to never receive sub-agent completion notifications. The user has to manually ask "did the sub-agent finish?" after every spawn.
Root Cause
In
runs-DrbsiywK.js(~line 147):Discord group chats use
sourceReplyDeliveryMode: "message_tool_only"(seebot-D0mzNk0g.js:6915—sourceReplyDeliveryMode: isRoomEvent ? "message_tool_only" : void 0). When the sub-agent completion event tries to deliver back to the parent session, thehandle.sourceReplyDeliveryModedoesn't match"message_tool_only", and the delivery is quietly dropped.Impact
This worked previously but broke at some point. The
sessions_yieldmechanism was a workaround (yield → wake on completion event), but even that has stopped working reliably in group chat contexts.Each sub-agent spawn requires manual user check-in to verify completion. This defeats the purpose of automated multi-agent orchestration.
Steps to Reproduce
sessions_spawnsessions_yieldto waitsource_reply_delivery_mode_mismatchSuggested Fix
The delivery failure at line 147 should fall through to an alternative delivery path instead of failing silently. Options:
source_reply_delivery_mode_mismatchoccurs, deliver the completion as an internalsystemEventinstead of dropping itmessage_tool_onlysupport to the session handle for group chat contextsEnvironment
#devin guild)sessions_spawn+sessions_yieldFound by: Josephur (user) & Brachyura McCrabface (main agent)