Bug Description
sessions_spawn correctly defines streamTo as an ACP-only field, and the executor explicitly rejects it when runtime !== "acp".
However, in the current tool-call path I observed sessions_spawn(runtime="subagent") receiving streamTo anyway, even though the intended call was a minimal subagent spawn.
That leads to an error like:
streamTo is only supported for runtime=acp; got runtime=subagent
This looks like a parameter pollution / tool-call bridge issue rather than a sessions_spawn business-logic issue.
Expected Behavior
When a caller intends a plain subagent spawn, the actual executed params should not contain ACP-only fields such as streamTo.
In other words:
runtime="subagent" calls should arrive without ACP-only routing fields
streamTo should only appear for genuine ACP spawn flows
Actual Behavior
A minimal sessions_spawn attempt for runtime="subagent" failed before entering normal spawn flow because streamTo was present in the executed args.
The executor then correctly rejected it with:
streamTo is only supported for runtime=acp; got runtime=subagent
What I checked
streamTo is intentionally ACP-only
Relevant code:
src/agents/acp-spawn.ts
src/agents/tools/sessions-spawn-tool.ts
streamTo was introduced for ACP parent-streaming behavior and has valid ACP semantics.
sessions_spawn core logic appears correct
sessions-spawn-tool.ts explicitly does:
- parse
streamTo
- reject it when
runtime !== "acp"
That part looks intentional and correct.
I did not find evidence that core sessions_spawn logic itself injects streamTo
Searching the core source only found streamTo in:
- ACP spawn logic
sessions_spawn schema/tool implementation
- related tests
I did not find a separate OpenClaw core business layer that obviously injects streamTo into subagent calls.
Likely problem area
This makes the problem look more like:
- tool-call bridge / adapter layer
- parameter serialization / propagation layer
- or some higher-level invocation path that carries optional schema fields into actual tool execution
Environment
- OpenClaw version: local source checkout based on
2026.3.24
- Runtime: local Linux / WSL2
- Channel/surface: tool invocation path from active agent session
- Observed during manual runtime validation
Suggested investigation direction
Please check the current tool-call bridge / adapter path for sessions_spawn and confirm whether optional schema fields are being propagated into actual executed params even when not intentionally requested.
Bug Description
sessions_spawncorrectly definesstreamToas an ACP-only field, and the executor explicitly rejects it whenruntime !== "acp".However, in the current tool-call path I observed
sessions_spawn(runtime="subagent")receivingstreamToanyway, even though the intended call was a minimal subagent spawn.That leads to an error like:
This looks like a parameter pollution / tool-call bridge issue rather than a
sessions_spawnbusiness-logic issue.Expected Behavior
When a caller intends a plain subagent spawn, the actual executed params should not contain ACP-only fields such as
streamTo.In other words:
runtime="subagent"calls should arrive without ACP-only routing fieldsstreamToshould only appear for genuine ACP spawn flowsActual Behavior
A minimal
sessions_spawnattempt forruntime="subagent"failed before entering normal spawn flow becausestreamTowas present in the executed args.The executor then correctly rejected it with:
What I checked
streamTois intentionally ACP-onlyRelevant code:
src/agents/acp-spawn.tssrc/agents/tools/sessions-spawn-tool.tsstreamTowas introduced for ACP parent-streaming behavior and has valid ACP semantics.sessions_spawncore logic appears correctsessions-spawn-tool.tsexplicitly does:streamToruntime !== "acp"That part looks intentional and correct.
I did not find evidence that core
sessions_spawnlogic itself injectsstreamToSearching the core source only found
streamToin:sessions_spawnschema/tool implementationI did not find a separate OpenClaw core business layer that obviously injects
streamTointo subagent calls.Likely problem area
This makes the problem look more like:
Environment
2026.3.24Suggested investigation direction
Please check the current tool-call bridge / adapter path for
sessions_spawnand confirm whether optional schema fields are being propagated into actual executed params even when not intentionally requested.