Skip to content

[Bug]: Subagent completion direct announce fails with no visible reply #82803

@galiniliev

Description

@galiniliev

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Completed subagent announcements can be marked undelivered when the direct completion agent finishes with no visible payload, leaving the requester with no visible completion reply.

Steps to reproduce

  1. Complete a subagent task whose requester should receive a direct completion announcement.
  2. Have the requester completion-agent handoff return a final agent result with an empty visible payload list.
  3. Observe that deliverSubagentAnnouncement returns a direct delivery failure instead of surfacing the available child completion result.

Expected behavior

The requester should receive a visible completion update when a single completed subagent has a captured child result, even if the direct completion agent produces no visible payload.

Actual behavior

The direct completion path rejects the announcement with completion agent did not produce a visible reply, and the caller logs Subagent completion direct announce failed.

OpenClaw version

Current main before the fix: c2e9091

Operating system

NOT_ENOUGH_INFO

Install method

pnpm dev / gateway development logs

Model

NOT_ENOUGH_INFO

Provider / routing chain

NOT_ENOUGH_INFO

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

Observed count: 83 lines matching "Subagent completion direct announce failed".

Redacted trace excerpt:
"Subagent completion direct announce failed for run [redacted run id]: completion agent did not produce a visible reply"
Neighboring same trace:
"queue message failed: sessionId=[redacted session id] reason=no_active_run"

Current code path before the fix:
src/agents/subagent-announce.ts logs the failed direct delivery.
src/agents/subagent-announce-delivery.ts rejects direct completion delivery when expectsCompletionMessage is true and the response has no visible payload.

Impact and severity

Affected: requester sessions waiting for completed subagent results.
Severity: High, because completed child work may not be visible to the requester.
Frequency: 83 observed log lines in the available gateway log evidence.
Consequence: missing summaries/results and follow-up queue errors after child runs finish.

Additional information

Related broader tracking: #44925.
Related open PRs in the same delivery area: #79059 and #80223. This report is narrower: it covers the current-main path where the completion-agent handoff returns no visible payload for a single completed subagent result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:needs-product-decisionClawSweeper 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:source-reproClawSweeper found a high-confidence source-level issue reproduction.maintainerMaintainer-authored PR

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions