openclaw - 💡(How to fix) Fix Subagent completion announce can generate main reply but leave delivery pending after gateway request timeout

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…

A subagent can complete successfully and the main requester session can generate the synthesized user-facing reply, but the announce/delivery path still times out and leaves the subagent task in delivery_status='pending'. The user-visible result is: the subagent appears done in UI/context, but no reply arrives in the external conversation until the user manually pokes Jarvis.

This is related to, but distinct from, #82787. In #82787 the parent stopped listening before child success. Here the parent subagent row is already succeeded, and the main session generated the response, but delivery/announce bookkeeping did not complete.

Root Cause

A subagent can complete successfully and the main requester session can generate the synthesized user-facing reply, but the announce/delivery path still times out and leaves the subagent task in delivery_status='pending'. The user-visible result is: the subagent appears done in UI/context, but no reply arrives in the external conversation until the user manually pokes Jarvis.

This is related to, but distinct from, #82787. In #82787 the parent stopped listening before child success. Here the parent subagent row is already succeeded, and the main session generated the response, but delivery/announce bookkeeping did not complete.

Fix Action

Fix / Workaround

  • Split main-agent synthesized reply from external message delivery confirmed in the announce state machine.
  • Persist the synthesized announce reply separately so retries can send it directly or through the message tool without re-invoking the model.
  • On gateway request timeout for agent, inspect the requester session for a new assistant message with the announce idempotency key / internal event lineage before declaring the announce failed.
  • If visible reply exists but external dispatch is unconfirmed, set a clear delivery_status='failed' or delivery_status='needs_retry' with the cached reply available for one-click/manual resend.
  • Avoid indefinite pendingFinalDelivery with no user-visible alert.
RAW_BUFFERClick to expand / collapse

Summary

A subagent can complete successfully and the main requester session can generate the synthesized user-facing reply, but the announce/delivery path still times out and leaves the subagent task in delivery_status='pending'. The user-visible result is: the subagent appears done in UI/context, but no reply arrives in the external conversation until the user manually pokes Jarvis.

This is related to, but distinct from, #82787. In #82787 the parent stopped listening before child success. Here the parent subagent row is already succeeded, and the main session generated the response, but delivery/announce bookkeeping did not complete.

Evidence

Example label: pwa-stage6-depth-fix-lumbergh-recheck

Run id: ebc87bf3-2fa7-4f11-b9ff-424c0e4d3fa7

tasks/runs.sqlite:

runtimeagentstatusdelivery_statuscreatedended
clilumberghsucceedednot_applicable2026-05-16 21:27:28 MDT2026-05-16 21:29:35 MDT
subagentmainsucceededpending2026-05-16 21:27:28 MDT2026-05-16 21:29:35 MDT

The child and parent both succeeded, but the parent delivery status remained pending.

Relevant logs:

  • logs/gateway.log:296639: subagent result text logged: Verdict: approve with caveats.
  • agents/main/sessions/febaff34-e7a8-4b0d-be95-d67f6f0fb0e5.jsonl:833: main session generated the synthesized user-facing reply at 2026-05-17T03:29:45.076Z, starting with Lumbergh **approved with caveats**.
  • logs/gateway.err.log:61011: 2026-05-16T21:31:36.107-06:00 Subagent completion direct announce failed for run ebc87bf3-2fa7-4f11-b9ff-424c0e4d3fa7: gateway request timeout for agent
  • logs/gateway.err.log:61012: same failure again at 2026-05-16T21:33:37.316-06:00.
  • subagents/runs.json for the run shows:
    • lastAnnounceDeliveryError: gateway request timeout for agent; direct-primary: gateway request timeout for agent
    • pendingFinalDelivery: true
    • pendingFinalDeliveryAttemptCount: 2

So the main answer existed, but the external announce/delivery path never marked it delivered and the user did not see it in the expected conversation.

Actual Behavior

  • Subagent completes successfully.
  • Main session receives/synthesizes the answer.
  • Direct announce call times out waiting for the agent/delivery path.
  • The run remains pendingFinalDelivery=true and task delivery remains pending.
  • The user sees no external response and has to manually poke Jarvis.

Expected Behavior

If the main session generated a visible assistant reply, OpenClaw should not leave the completion in a silent pending state.

Possible acceptable outcomes:

  • Confirm external delivery and mark delivery_status='delivered'.
  • If external delivery fails but a visible main-session reply exists, retry delivery of that cached reply without re-running the full main agent call.
  • If delivery remains unconfirmed, surface an explicit delivery failure instead of leaving pending indefinitely.
  • Add a reconciler for subagent status=succeeded AND delivery_status=pending AND visible requester reply exists.

Suggested Fixes

  • Split main-agent synthesized reply from external message delivery confirmed in the announce state machine.
  • Persist the synthesized announce reply separately so retries can send it directly or through the message tool without re-invoking the model.
  • On gateway request timeout for agent, inspect the requester session for a new assistant message with the announce idempotency key / internal event lineage before declaring the announce failed.
  • If visible reply exists but external dispatch is unconfirmed, set a clear delivery_status='failed' or delivery_status='needs_retry' with the cached reply available for one-click/manual resend.
  • Avoid indefinite pendingFinalDelivery with no user-visible alert.

Environment

Observed locally on OpenClaw 2026.5.12, macOS, Discord channel #pwa-polymarket-weather.

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 Subagent completion announce can generate main reply but leave delivery pending after gateway request timeout