openclaw - 💡(How to fix) Fix [Bug]: Dormant completion delivery probes stale embedded run sessions [1 pull requests]

Official PRs (…)
ON THIS PAGE

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…

Subagent completion delivery probes a stored requester session id after the requester run is dormant, producing repeated reason=no_active_run queue failures instead of going straight to the requester-agent handoff path.

Root Cause

Affected: sessions receiving late subagent completion announcements after the requester embedded run has already completed or gone missing. Severity: High, based on the local report, because delivery attempts can target a stale session and create noisy queue-failure churn. Frequency: 192 observed log lines in the captured gateway log. Consequence: completion announcements or late delivery attempts may miss the intended user-visible path and generate repeated debug noise.

Fix Action

Fixed

Code Example

Trace/proof:
- gateway-dev.log line 26944:
  "queue message failed: sessionId=[redacted session id] reason=no_active_run"
  traceId=[redacted trace id] spanId=[redacted span id]
- gateway-dev.log line 30248:
  "queue message failed: sessionId=[redacted session id] reason=no_active_run"
  traceId=[redacted trace id] spanId=[redacted span id]

Observed count: 192 lines matching "reason=no_active_run".
Current code before the fix:
- src/agents/subagent-announce-delivery.ts resolved a stored requester session id and attempted completion wake delivery even when requester activity reported isActive=false.
- src/agents/pi-embedded-runner/runs.ts returned reason=no_active_run when no active embedded or reply-run handle existed for that session id.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Subagent completion delivery probes a stored requester session id after the requester run is dormant, producing repeated reason=no_active_run queue failures instead of going straight to the requester-agent handoff path.

Steps to reproduce

NOT_ENOUGH_INFO

Expected behavior

Late subagent completion announcements for dormant requester sessions should use the requester-agent/direct delivery handoff without first trying to queue into a missing embedded run.

Actual behavior

Observed gateway logs contain 192 lines matching reason=no_active_run. Two sampled log lines show queue message failed for the same redacted requester session id after the active embedded run was gone.

OpenClaw version

NOT_ENOUGH_INFO

Operating system

NOT_ENOUGH_INFO

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

Trace/proof:
- gateway-dev.log line 26944:
  "queue message failed: sessionId=[redacted session id] reason=no_active_run"
  traceId=[redacted trace id] spanId=[redacted span id]
- gateway-dev.log line 30248:
  "queue message failed: sessionId=[redacted session id] reason=no_active_run"
  traceId=[redacted trace id] spanId=[redacted span id]

Observed count: 192 lines matching "reason=no_active_run".
Current code before the fix:
- src/agents/subagent-announce-delivery.ts resolved a stored requester session id and attempted completion wake delivery even when requester activity reported isActive=false.
- src/agents/pi-embedded-runner/runs.ts returned reason=no_active_run when no active embedded or reply-run handle existed for that session id.

Impact and severity

Affected: sessions receiving late subagent completion announcements after the requester embedded run has already completed or gone missing. Severity: High, based on the local report, because delivery attempts can target a stale session and create noisy queue-failure churn. Frequency: 192 observed log lines in the captured gateway log. Consequence: completion announcements or late delivery attempts may miss the intended user-visible path and generate repeated debug noise.

Additional information

The fix should preserve active requester steering, but dormant requester completions should route directly through requester-agent/direct delivery. Exact session identifiers and trace ids are redacted from this public report.

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…

FAQ

Expected behavior

Late subagent completion announcements for dormant requester sessions should use the requester-agent/direct delivery handoff without first trying to queue into a missing embedded run.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING