-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Subagent announce fails after sessions_yield: adapter unavailable during yield suspension #88042
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: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.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.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.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.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
Give feedbackNo fields configured for issues without a type.
Bug Description
After
sessions_yield, subagent completion announcements fail withtelegram outbound adapter is unavailable. The retry mechanism (3 retries within ~5 seconds) is too short for the yield suspension window, causing silent message loss.Root Cause
When a parent agent calls
sessions_yield, the session enters a suspended state. When the child completes and triggers announce, the outbound adapter is unavailable because the session is suspended. The external retry loop (maxAnnounceRetryCount=3insubagent-registry-helpers.ts, line 827) retries 3 times with exponential backoff (1s → 2s → 4s), completing all retries within ~5 seconds.However, the yield suspension typically lasts minutes (until the child finishes), so the adapter remains unavailable throughout all retry attempts. After 3 failures, the message is silently dropped.
Contrast with #56347
Issue #56347 (fixed in v2026.4.22) addressed a registry mismatch where the wrong registry was consulted. That fix correctly routes through the pinned channel registry.
This is a different problem: the registry is correct, but the adapter is genuinely unavailable because the session is in a yielded/suspended state. The fix for #56347 does not help here.
Evidence
Gateway logs (OpenClaw v2026.5.27):
Note: 21:35:16 shows the adapter eventually recovers and detects the pending message, but refuses to replay it (safety mechanism against duplicates).
5 minutes later, a normal user message triggers the parent session to resume, and the response delivers successfully — confirming the adapter itself is fine, just temporarily unavailable during yield suspension.
Workaround
Parent agents should not rely on auto-announce after
sessions_yield. Instead, after yield resumes, the parent should explicitly re-output the child result to ensure delivery.Suggested Fix
Increase retry window for announce after yield: When the parent session is in a yielded state, the announce retry window should be extended (e.g., match the yield timeout or use a longer backoff).
Queue mechanism: Instead of dropping the message after 3 retries, queue it for delivery when the adapter becomes available (similar to how the reconnect drain already detects pending messages).
At minimum: Log the dropped message content or provide a recovery API so the parent can retrieve and resend the lost message.
Environment