Skip to content

sessions_spawn: LLMs pass streamTo for subagent runtime causing 100% spawn failures #63120

Description

@SuperSupeng

Problem

When using sessions_spawn with runtime="subagent", LLMs (e.g. GPT-5.4, Claude) consistently pass streamTo: "parent" alongside the spawn call. This triggers the validation error:

streamTo is only supported for runtime=acp; got runtime=subagent

This causes 100% failure rate for all subagent spawns when the LLM decides to include streamTo.

Root Cause

The streamTo parameter in the SessionsSpawnToolSchema has no description field, unlike other runtime-specific parameters such as resumeSessionId (which explicitly states Requires runtime="acp") and lightContext (which states Only applies to runtime='subagent').

Without guidance in the schema, LLMs see streamTo: "parent" as a generally useful option and include it by default — especially since streaming results back to the parent sounds like desirable behavior for any spawn.

The tool description (describeSessionsSpawnTool) also doesn't mention which parameters are runtime-specific.

Impact

In our production multi-agent setup (OpenClaw 2026.4.1), Secretary agent attempted to spawn CTO/dev-lead agents 10+ consecutive times, all failing with the same error. The agent retried with different parameter combinations but never dropped streamTo, because nothing in the schema told it to.

This effectively breaks the entire cross-agent collaboration chain — tasks get written to the task board but no agent is spawned to execute them.

Observed Behavior

{
  "agentId": "cto",
  "runtime": "subagent",
  "streamTo": "parent",
  "task": "..."
}
// → { "status": "error", "error": "streamTo is only supported for runtime=acp; got runtime=subagent" }

The LLM retried 10+ times, sometimes simplifying other parameters, but always kept streamTo: "parent".

Expected Behavior

The schema should clearly indicate that streamTo is acp-only, so LLMs don't include it for subagent spawns. Other acp-only parameters already follow this pattern (e.g., resumeSessionId).

Suggested Fix

  1. Add a description to the streamTo schema field stating it requires runtime="acp"
  2. Update the tool description to list which params are subagent-safe vs acp-only

Environment

  • OpenClaw 2026.4.1
  • Models affected: GPT-5.4 (nexus), likely all LLMs

Metadata

Metadata

Assignees

No one assigned

    Labels

    clawsweeperTracked by ClawSweeper automation

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions