openclaw - 💡(How to fix) Fix sessions_spawn: expectsCompletionMessage:false ignored at announce-flow call site [2 comments, 3 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#75848Fetched 2026-05-02 05:29:05
View on GitHub
Comments
2
Participants
3
Timeline
5
Reactions
2
Timeline (top)
commented ×2closed ×1mentioned ×1subscribed ×1

Root Cause

Root cause The expectsCompletionMessage flag is parsed off the spawn request but never consulted at the announce-flow call site. The default behavior ("announce on completion") fires unconditionally.

Fix Action

Fix / Workaround

Workaround We've been running a local runtime patch since 2026-04-29. Happy to PR.

RAW_BUFFERClick to expand / collapse

Symptom When a parent agent calls sessions_spawn with expectsCompletionMessage: false, the subagent's completion still steers the parent CLI session — announce-flow displaces the parent's active thread when the subagent finishes. This breaks any pattern where a parent wants to fire-and-forget a subagent without losing its own interactive context.

Root cause The expectsCompletionMessage flag is parsed off the spawn request but never consulted at the announce-flow call site. The default behavior ("announce on completion") fires unconditionally.

Suggested fix At the announce call site in the subagent registry, short-circuit when expectsCompletionMessage === false so the parent's active thread is preserved.

Affected dist file subagent-registry-*.js

Workaround We've been running a local runtime patch since 2026-04-29. Happy to PR.

extent analysis

TL;DR

The issue can be fixed by modifying the subagent registry to short-circuit the announce-flow call when expectsCompletionMessage is false.

Guidance

  • Verify the issue by checking if the expectsCompletionMessage flag is being parsed correctly from the spawn request in the subagent-registry-*.js file.
  • Check the announce-flow call site in the subagent registry to confirm that it is not consulting the expectsCompletionMessage flag.
  • To fix the issue, add a conditional statement at the announce-flow call site to short-circuit when expectsCompletionMessage is false.
  • Test the fix by running a scenario where a parent agent calls sessions_spawn with expectsCompletionMessage: false and verify that the parent's active thread is preserved.

Example

if (expectsCompletionMessage === false) {
  // short-circuit and do not announce completion
  return;
}
// existing announce-flow code

Notes

The suggested fix assumes that the expectsCompletionMessage flag is being passed correctly from the parent agent to the subagent registry. If this is not the case, additional debugging may be required.

Recommendation

Apply the suggested fix by modifying the subagent registry to short-circuit the announce-flow call when expectsCompletionMessage is false, as this will preserve the parent's active thread and fix the issue.

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