Skip to content

[Bug]: Subagent terminal reconciliation can expire suspended final delivery #86537

@galiniliev

Description

@galiniliev

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Subagent terminal delivery can time out repeatedly during reconciliation, then expire and discard the pending final payload instead of preserving the completion for the requester.

Steps to reproduce

  1. Run OpenClaw with subagents that return completion output to a busy requester session.
  2. Let the subagent wait path time out and defer terminal state to session reconciliation.
  3. Observe the suspended final-delivery outbox later expire.

Expected behavior

Subagent completion output should remain available through delivery to the requester or durable session history even if final delivery is suspended long enough to expire.

Actual behavior

Gateway logs showed 215 subagent wait timed out; deferring terminal state until session reconciliation lines and 25 subagent suspended delivery discarded lines in the 2026-05-23T14:42:08Z through 2026-05-25T14:42:08Z window.

OpenClaw version

2026.5.25 dev checkout

Operating system

Linux WSL2

Install method

pnpm dev

Model

NOT_ENOUGH_INFO

Provider / routing chain

NOT_ENOUGH_INFO

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

Window analyzed: 2026-05-23T14:42:08Z through 2026-05-25T14:42:08Z
Counts:
- 215 lines contained: subagent wait timed out; deferring terminal state until session reconciliation
- 25 lines contained: subagent suspended delivery discarded

Redacted excerpts:
{"message":"subagent wait timed out; deferring terminal state until session reconciliation","time":"2026-05-23T15:22:43.688+00:00","meta":{"runId":"[redacted run id]","childSessionKey":"[redacted child session key]"}}
{"message":"subagent suspended delivery discarded","time":"2026-05-24T13:33:11.882+00:00","meta":{"reason":"expired","runId":"[redacted run id]","childSessionKey":"[redacted child session key]","requesterSessionKey":"[redacted requester session key]"}}

Impact and severity

Affected: subagent completion delivery for requester sessions.
Severity: High, because final completion output can be lost after child work settles.
Frequency: 25 discarded suspended deliveries were observed in the analyzed two-day log window.
Consequence: requester sessions can miss subagent completion output.

Additional information

The implicated code paths were src/agents/subagent-registry-run-manager.ts terminal wait retry handling and src/agents/subagent-registry.ts suspended delivery expiry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.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.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, 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.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