openclaw - 💡(How to fix) Fix [Bug]: `sessions_spawn` subagent completes but result never returns to parent session after `sessions_yield` [1 comments, 1 participants]

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…
GitHub stats
openclaw/openclaw#60474Fetched 2026-04-08 02:50:40
View on GitHub
Comments
1
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×2closed ×1commented ×1locked ×1

When spawning a subagent with streamTo:"parent" and then ending the parent turn with sessions_yield, the child run appears to execute but its completion result never returns to the parent session.

Root Cause

When spawning a subagent with streamTo:"parent" and then ending the parent turn with sessions_yield, the child run appears to execute but its completion result never returns to the parent session.

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

When spawning a subagent with streamTo:"parent" and then ending the parent turn with sessions_yield, the child run appears to execute but its completion result never returns to the parent session.

Steps to reproduce

  1. In a session, call sessions_spawn with a trivial task, for example: • task: Reply with exactly: DONE • runtime: subagent • mode: run • cleanup: delete • streamTo: parent
  2. Immediately call sessions_yield in the parent session.
  3. Wait for the subagent to finish.

Expected behavior

• The child run completes. • Its result is delivered back into the parent session as the next message/event.

Actual behavior

• The child run appears to launch successfully. • It later disappears from the active subagent list. • No completion result is delivered back to the parent session.

OpenClaw version

v2026.3.31, v2026.3.28

Operating system

macOS Tahoe 26.3.1 (25D2128)

Install method

npm global

Model

Main session: openai-codex/gpt-5.4; Sub-agent tested with openai-codex/gpt-5.4, default subagent model, and explicit Claude-family request

Provider / routing chain

Telegram group chat -> OpenClaw main session -> sessions_spawn (runtime=subagent, streamTo=parent) -> subagent runtime -> expected completion handoff back to parent session

Additional provider/model setup details

Tested with main session model openai-codex/gpt-5.4; subagent tested with explicit model openai-codex/gpt-5.4 and also with an explicit Claude-family request.

Logs, screenshots, and evidence

Impact and severity

  • Affected: OpenClaw sessions using sessions_spawn(..., streamTo:"parent") followed by sessions_yield, observed in this Telegram group session
  • Severity: High (blocks push-based subagent orchestration and chained agent workflows)
  • Frequency: 4/4 observed attempts across v2026.3.28 and v2026.3.31, including after gateway restart and full machine reboot
  • Consequence: Subagents appear to launch and later disappear from the active list, but their completion results do not return to the parent session, forcing manual recovery or abandonment of the workflow

Additional information

• Reproduced before and after update from v2026.3.28 to v2026.3.31 • Reproduced after gateway restart • Reproduced after full machine reboot

extent analysis

TL;DR

The issue can be mitigated by re-examining the usage of sessions_yield in the parent session, potentially replacing it with an alternative approach that allows the subagent's completion result to be properly returned.

Guidance

  • Review the documentation for sessions_yield to ensure it is being used correctly in the context of subagent workflows, especially with streamTo:"parent".
  • Consider implementing a temporary workaround where the parent session periodically checks for subagent completion instead of relying solely on sessions_yield.
  • Verify that the subagent's task is correctly defined and that its completion result is properly formatted for return to the parent session.
  • Investigate if there are any version-specific changes in OpenClaw (between v2026.3.28 and v2026.3.31) that could affect the behavior of sessions_spawn or sessions_yield.

Example

No specific code example can be provided without further details on the implementation, but reviewing the calls to sessions_spawn and sessions_yield in the context of the subagent workflow is crucial.

Notes

The issue seems to be related to the interaction between sessions_spawn with streamTo:"parent" and the subsequent call to sessions_yield in the parent session. The fact that it has been reproduced across different versions and after restarts suggests a potential issue with the workflow design or an underlying bug in OpenClaw's handling of subagent completions.

Recommendation

Apply a workaround by modifying the parent session's workflow to periodically check for subagent completion, as the current usage of sessions_yield may not be compatible with the desired subagent workflow. This approach allows for a temporary solution while the root cause is further investigated.

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

• The child run completes. • Its result is delivered back into the parent session as the next message/event.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING