openclaw - 💡(How to fix) Fix Discord-bound subagent completions can fail direct announce and get orphan-pruned

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…

On Discord-bound subagent spawns, the parent session can receive only a spawn-acceptance object while the actual child completion never becomes visible. The gateway then logs both a direct-announce failure and an orphan-prune event for the same run, which leaves the user with missing subagent output.

Error Message

[warn] Subagent orphan run pruned source=resume run=<RUN_UUID> child=agent:<TARGET>:subagent:<CHILD_UUID> reason=missing-session-entry

  • Make the direct-announce path surface a structured error to the parent when the completion agent fails, instead of silently dropping the child result.

Root Cause

This is user-facing content loss, not just noisy logs. The subagent appears to run (DGX GPU activity is observed), but the completion never makes it back into the parent session in a usable way.

Code Example

Subagent completion direct announce failed for run <RUN_UUID>: completion agent did not produce a visible reply
[warn] Subagent orphan run pruned source=resume run=<RUN_UUID> child=agent:<TARGET>:subagent:<CHILD_UUID> reason=missing-session-entry
RAW_BUFFERClick to expand / collapse

Summary

On Discord-bound subagent spawns, the parent session can receive only a spawn-acceptance object while the actual child completion never becomes visible. The gateway then logs both a direct-announce failure and an orphan-prune event for the same run, which leaves the user with missing subagent output.

Environment

  • OpenClaw version: 2026.5.12 (f066dd2)
  • Install style: native install (no Docker)
  • Host: NUC1
  • Channel: Discord-bound parent session

Reproduction

  1. Bind an agent session to Discord.
  2. From the parent session, call sessions_spawn({ agentId: "keelstone", ... }) for a single subagent task.
  3. Keep the parent in the same turn (no sessions_yield) and wait for the child completion.
  4. Capture the gateway journal for the run.

Expected

The parent session should receive integratable child text from the spawned subagent, and the user should see the completed artifact in the parent reply.

Actual

The parent gets only a spawn acceptance object or otherwise has no child text to integrate. The gateway logs two lines for the same run:

Subagent completion direct announce failed for run <RUN_UUID>: completion agent did not produce a visible reply
[warn] Subagent orphan run pruned source=resume run=<RUN_UUID> child=agent:<TARGET>:subagent:<CHILD_UUID> reason=missing-session-entry

In our recorded case (BT-01 R3 on 2026-05-17), the run was 3a793e0b-f842-4104-b4a5-54e2be42dfae and the child session was agent:keelstone:subagent:072af2d8-ebc6-4bc3-8e5b-995117c4dfd8.

Why this matters

This is user-facing content loss, not just noisy logs. The subagent appears to run (DGX GPU activity is observed), but the completion never makes it back into the parent session in a usable way.

Likely cause

We suspect a failure in the direct-announce / completion-agent path, possibly combined with a race where the child session entry is pruned before the parent resume path can read it.

Suggested fixes

  • Make the direct-announce path surface a structured error to the parent when the completion agent fails, instead of silently dropping the child result.
  • Hold child session state long enough to survive a slow resume/announce tick.
  • Decouple Discord hook side effects from parent-session completion delivery.

Related issues / cross-link request

This seems related to other silent-failure patterns already filed in this repo. Please cross-link as appropriate with:

  • #83212 (plugins.entries.discord.enabled missing leaves Discord silently disabled)
  • #83337 (plugin/core version drift causes silent channel failure)

Also, if the upcoming discord-subagent-ended-hook report is the same root cause in older Docker builds, it may be worth consolidating or explicitly linking the two.

Notes

Primary AoAOS doc:

  • docs/upstream-bugs/subagent-direct-announce-failure.md

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 Discord-bound subagent completions can fail direct announce and get orphan-pruned