openclaw - 💡(How to fix) Fix sendAnnounce queue path passes deliver:true without channel for sessions with no origin [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59201Fetched 2026-04-08 02:27:35
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Root Cause

The sendAnnounce function (queue drain path) doesn't check if the origin has a valid channel+to before setting deliver: true:

deliver: !requesterIsSubagent,  // Always true for depth-0 non-cron sessions

The direct path (sendSubagentAnnounceDirectly) correctly uses resolveExternalBestEffortDeliveryTarget which sets deliver: false when no channel+to pair exists.

Fix Action

Workaround

Local patch applied to dist/pi-embedded-iRgRpYxO.js as described in the suggested fix above. Will be overwritten on next npm update.

Code Example

Channel is required when multiple channels are configured: telegram, bluebubbles

---

deliver: !requesterIsSubagent,  // Always true for depth-0 non-cron sessions

---

deliver: !requesterIsSubagent && Boolean(origin?.channel && origin?.to),
bestEffortDeliver: !requesterIsSubagent && !Boolean(origin?.channel && origin?.to),
RAW_BUFFERClick to expand / collapse

Bug

When the gateway has multiple channels configured (e.g., telegram + bluebubbles), the sendAnnounce function in the announce queue path (src/agents/subagent-announce-delivery.ts) unconditionally sets deliver: !requesterIsSubagent.

For Paperclip adapter sessions (agent:eng:paperclip:issue:*), which have channel: null, lastChannel: null, origin: null in the session store and subagent depth 0, this sends deliver: true with no explicit channel to the gateway's agent handler. The agent handler then hits resolveMessageChannelSelection which throws:

Channel is required when multiple channels are configured: telegram, bluebubbles

This causes ACP/subagent completion announcements to silently fail after exhausting retries (7 attempts observed).

Root Cause

The sendAnnounce function (queue drain path) doesn't check if the origin has a valid channel+to before setting deliver: true:

deliver: !requesterIsSubagent,  // Always true for depth-0 non-cron sessions

The direct path (sendSubagentAnnounceDirectly) correctly uses resolveExternalBestEffortDeliveryTarget which sets deliver: false when no channel+to pair exists.

Affected Versions

Confirmed in 2026.3.31 and 2026.4.1.

Suggested Fix

In sendAnnounce, gate deliver: true on the presence of a valid channel+to in the origin:

deliver: !requesterIsSubagent && Boolean(origin?.channel && origin?.to),
bestEffortDeliver: !requesterIsSubagent && !Boolean(origin?.channel && origin?.to),

This aligns the queue path behavior with the direct path's use of resolveExternalBestEffortDeliveryTarget.

Workaround

Local patch applied to dist/pi-embedded-iRgRpYxO.js as described in the suggested fix above. Will be overwritten on next npm update.

extent analysis

TL;DR

Update the sendAnnounce function to conditionally set deliver based on the presence of a valid channel and recipient in the origin.

Guidance

  • Review the sendAnnounce function in src/agents/subagent-announce-delivery.ts to ensure it checks for a valid channel and recipient before setting deliver: true.
  • Verify that the resolveExternalBestEffortDeliveryTarget function is used correctly in the direct path to set deliver: false when no channel+to pair exists.
  • Apply the suggested fix to update the deliver and bestEffortDeliver logic in the sendAnnounce function.
  • Test the updated function to ensure ACP/subagent completion announcements are sent correctly even when multiple channels are configured.

Example

deliver: !requesterIsSubagent && Boolean(origin?.channel && origin?.to),
bestEffortDeliver: !requesterIsSubagent && !Boolean(origin?.channel && origin?.to),

Notes

This fix assumes that the origin object has channel and to properties that can be used to determine the validity of the channel and recipient.

Recommendation

Apply the suggested fix to update the sendAnnounce function, as it aligns the queue path behavior with the direct path's use of resolveExternalBestEffortDeliveryTarget and resolves the issue with ACP/subagent completion announcements silently failing when multiple channels are configured.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix sendAnnounce queue path passes deliver:true without channel for sessions with no origin [1 participants]