fix: ignore ACP-only streamTo for subagent spawns#40102
Conversation
Greptile SummaryThis PR fixes a regression introduced in Key changes:
The fix is minimal, targeted, and safe—it simply makes the system tolerant of a field that shouldn't affect subagent behavior, while preserving full ACP support. Confidence Score: 5/5
Last reviewed commit: 88cae38 |
|
This pull request has been automatically marked as stale due to inactivity. |
|
Closing this as duplicate or superseded after Codex automated review. Close #40102 as superseded by open PR #68397. Current main still has the runtime=subagent failure, so this is not implemented-on-main, but #68397 is the broader canonical fix: it strips both ACP-only Best possible solution: Close #40102 as superseded and keep the remaining review/landing work on #68397, which is the broader canonical fix for ACP-only fields on What I checked:
So I’m closing this here and keeping the remaining discussion on the canonical linked item. Codex Review notes: model gpt-5.5, reasoning high; reviewed against d54d2d6b9b8a. |
Summary
Fix
sessions_spawnso ACP-onlystreamTono longer breaks normal subagent runs.In
2026.3.7,streamTobecame visible on the generalsessions_spawnsurface, but runtime validation still rejects it unlessruntime="acp". In practice this caused subagent spawns to fail with:That was especially easy to hit when tool callers or model-generated calls treated
streamToas a generic optional field onsessions_spawn.This change keeps ACP behavior intact while making subagent spawns tolerant:
runtime="acp"keeps usingstreamTonormallyruntime="subagent"ignoresstreamTofor compatibility instead of returning an errorstreamToas ACP-only and explicitly note that subagent runtime ignores itWhy this approach
This is intentionally a compatibility fix, not a feature removal.
streamTois still a valid ACP feature and should remain available for ACP session flows. The bug was that the sharedsessions_spawnsurface exposed the field broadly while runtime treated it as ACP-only. Ignoring it on subagent runs is the safest behavior for existing callers and avoids breaking ACP.Tests
Passed:
node $(find node_modules -path '*/vitest/vitest.mjs' | head -n 1) run src/agents/tools/sessions-spawn-tool.test.ts src/agents/openclaw-tools.sessions.test.tsResults:
src/agents/tools/sessions-spawn-tool.test.ts✅src/agents/openclaw-tools.sessions.test.ts✅Files changed
src/agents/tools/sessions-spawn-tool.tssrc/agents/tools/sessions-spawn-tool.test.tsdocs/tools/index.md