-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: Subagent completion silently dropped when announce steers into a requester run that ends before processing it #92433
Copy link
Copy link
Open
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: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.
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: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
Priority
None yet
Summary
When a subagent completes while its requester's run is still active,
maybeSteerSubagentAnnounce(src/agents/subagent-announce-delivery.ts) enqueues the completion into the active run and returnsstatus: "steered"as soon asqueueOutcome.queuedis true.waitForTranscriptCommit: trueguarantees the message is written to the transcript, not that the run processes it. If the requester run ends in the window between enqueue and consumption, the completion sits in the transcript as a trailing user message forever: the run row getscompletion_announced_atset,announce_retry_countstays null, no error is recorded anywhere, and no follow-up turn ever fires. The work dies silently.Observed instance (2026-06-12, OpenClaw 2026.6.6 stable, macOS)
main, CLI-invoked):sessions_spawnaccepted at 11:24:08Z, childagent:qa:subagent:7e67b290-…; requester calledsessions_yieldat 11:24:35.576Z.ended_reason: subagent-complete, outcome ok).[Internal task completion event]into the requester transcript at 11:24:35.644Z — 70 ms after the yield; the run's end marker follows at 11:24:36.013Z. No assistant entry ever follows it.subagent_runsrow:completion_announced_at = 1781263475645,announce_retry_count = NULL,last_announce_delivery_error = NULL,pending_final_delivery = 0— i.e. the runtime believes delivery succeeded.Identical orchestration on the same host where the child completed after the requester run fully ended took the direct path and worked (fresh completion agent turn fired ~30 s later). The failure is purely the enqueue-vs-run-teardown race, which makes it intermittent and very hard for operators to notice — there is no log line, no error, and the announce bookkeeping says delivered.
Expected
Either of:
Impact
Multi-agent orchestration loses completions nondeterministically whenever a fast child finishes inside its requester's spawn turn — the requester yields 'waiting for completion' and never hears back. We are mitigating with a transcript sweep that detects trailing
[Internal task completion event]entries with no assistant turn after them, but the race belongs upstream.