Bug: streamTo parameter in sessions_spawn breaks subagent runtime
Environment
- OpenClaw version: 2026.3.8 (also affects 3.7+)
- OS: macOS (Apple Silicon)
- Runtime: subagent (default)
- Model: aiberm/openai/gpt-5.4
Description
The streamTo parameter was added to the sessions_spawn tool schema for ACP runtime support. However, this parameter is visible to all runtime modes in the tool schema. When using models like gpt-5.4 that strictly follow tool schemas, the model automatically includes streamTo: "parent" in every sessions_spawn call.
For runtime=subagent (the default), this triggers a 400 error:
streamTo is only supported for runtime=acp; got runtime=subagent
This makes sessions_spawn completely unusable for subagent-mode agents using schema-following models.
Steps to Reproduce
- Configure an agent with
runtime=subagent (or default) using gpt-5.4
- Have the agent call
sessions_spawn with any task
- The model will include
streamTo: "parent" because it's in the tool schema
- API returns 400 error
Expected Behavior
Either:
streamTo should not appear in the tool schema when runtime != acp
- Or
streamTo should be silently ignored (not error) for non-ACP runtimes
Workaround
Patched 10 dist files to silently ignore streamTo for non-ACP runtime:
// Before (error):
if (streamTo && runtime !== "acp") return jsonResult({ status: "error", error: `streamTo is only supported...` });
// After (noop):
if (streamTo && runtime !== "acp") { /* noop */ }
Impact
- All agents using subagent runtime + schema-following models are affected
- 90%+ of sessions_spawn calls fail (115/127 in our testing)
- Agents fall back to doing work themselves instead of delegating
Bug: streamTo parameter in sessions_spawn breaks subagent runtime
Environment
Description
The
streamToparameter was added to thesessions_spawntool schema for ACP runtime support. However, this parameter is visible to all runtime modes in the tool schema. When using models like gpt-5.4 that strictly follow tool schemas, the model automatically includesstreamTo: "parent"in everysessions_spawncall.For
runtime=subagent(the default), this triggers a 400 error:This makes
sessions_spawncompletely unusable for subagent-mode agents using schema-following models.Steps to Reproduce
runtime=subagent(or default) using gpt-5.4sessions_spawnwith any taskstreamTo: "parent"because it's in the tool schemaExpected Behavior
Either:
streamToshould not appear in the tool schema whenruntime != acpstreamToshould be silently ignored (not error) for non-ACP runtimesWorkaround
Patched 10 dist files to silently ignore
streamTofor non-ACP runtime:Impact