Version: OpenClaw 2026.4.26 (reproduced from 2026.4.15 onward)
File: dist/subagent-announce-Dim2fAZI.js (hash floats; the file with runSubagentAnnounceFlow / childCompletionFindings)
Symptom
When a sub-agent uses tools that trigger auto-compaction mid-turn (most reliably reproduced with Grok / DeepSeek + web_search returning a large Tavily JSON payload), the announce flow's agent.wait resolves before the post-compaction assistant message is produced. readSubagentOutput then returns the raw tool-result text (Tavily JSON, etc.) as the "reply", which is checked against ANNOUNCE_SKIP, fails, and the raw JSON gets injected into the parent session as the announcement.
Cause
The post-compaction retry loop only ran inside the if (childCompletionFindings) { ... } branch in earlier versions. After the 4.26 split into subagent-announce-*.js, both branches still resolve before post-compaction output is available; there is no unified retry that covers both paths.
Suggested fix
After both the !childCompletionFindings and childCompletionFindings branches complete, before evaluating outcome, run a unified retry:
- If
readLatestAssistantReply({sessionKey, limit:100}) returns text, re-check it for isAnnounceSkip / isSilentReplyText.
- Otherwise poll every 3s for up to ~35s for delayed post-compaction output.
Running locally as a patch — without it, every Grok+web_search sub-agent leaks its tool JSON to the parent. Happy to PR if useful.
Related: #67750, #70334 (compaction edge cases)
Version: OpenClaw 2026.4.26 (reproduced from 2026.4.15 onward)
File:
dist/subagent-announce-Dim2fAZI.js(hash floats; the file withrunSubagentAnnounceFlow/childCompletionFindings)Symptom
When a sub-agent uses tools that trigger auto-compaction mid-turn (most reliably reproduced with Grok / DeepSeek +
web_searchreturning a large Tavily JSON payload), the announce flow'sagent.waitresolves before the post-compaction assistant message is produced.readSubagentOutputthen returns the raw tool-result text (Tavily JSON, etc.) as the "reply", which is checked againstANNOUNCE_SKIP, fails, and the raw JSON gets injected into the parent session as the announcement.Cause
The post-compaction retry loop only ran inside the
if (childCompletionFindings) { ... }branch in earlier versions. After the 4.26 split intosubagent-announce-*.js, both branches still resolve before post-compaction output is available; there is no unified retry that covers both paths.Suggested fix
After both the
!childCompletionFindingsandchildCompletionFindingsbranches complete, before evaluatingoutcome, run a unified retry:readLatestAssistantReply({sessionKey, limit:100})returns text, re-check it forisAnnounceSkip/isSilentReplyText.Running locally as a patch — without it, every Grok+web_search sub-agent leaks its tool JSON to the parent. Happy to PR if useful.
Related: #67750, #70334 (compaction edge cases)