Skip to content

[Bug]: Subagent sessions_spawn returns empty result to parent despite valid child output #82233

Description

@saphoroth

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

When using sessions_spawn to dispatch a subagent, the parent receives status: completed successfully with an empty/null result — even when the child session's JSONL transcript contains a full, valid response. The result is lost between the child's JSONL capture and the parent's result delivery.

This is a result propagation failure in the subagent harness layer. Output size/complexity appears to correlate with failure likelihood.

Steps to reproduce

  1. Spawn a subagent via sessions_spawn with a non-trivial task (one requiring meaningful reasoning or analysis)
  2. Observe: parent receives status: completed successfully, output: null, usage.totalTokens: 0
  3. Inspect the child's session JSONL directly: it contains a full, valid assistant response

Critical detail — size correlation: Short diagnostic outputs propagate correctly; long structured analyses may be lost. The failure appears to correlate with output size or complexity.

Expected behavior

Parent receives the child's complete output (or at minimum an error indicating why output was unavailable), not an empty success.

Actual behavior

  • Child session JSONL: full valid response
  • Parent result: output: null, totalTokens: 0, status: completed successfully
  • No error surfaced to parent
  • Child JSONL proves the provider API received the request, generated output, and returned it to the child process

OpenClaw version

2026.4.x (or current stable version — test against latest)

Operating system

Linux (tested on Linux; macOS/Windows likely affected too)

Install method

npm global

Model

Any model used with sessions_spawn (tested with various worker models)

Provider / routing chain

openclaw → [provider] → [model] (tested with multiple providers)

Additional provider/model setup details

Standard sessions_spawn setup. Child workers operate normally in isolation — only result propagation to parent is affected.

Logs, screenshots, and evidence

**Root cause:** The failure is in the result propagation/harness layer, between the child process capturing the response and the parent process receiving it:

1. Child receives task via `sessions_spawn`
2. Child does work and produces a full structured analysis (confirmed via child JSONL)
3. **Result is captured in child JSONL but never delivered to parent**
4. Parent receives empty success

The child process successfully captures the output locally; the loss occurs when transmitting it back to the parent. This is the same failure family as openclaw/openclaw#80498 (harness-level result delivery bugs).

Impact and severity

  • Severity: High for orchestration — silent failures can advance phases incorrectly and corrupt evidence integrity
  • Detection: Silent failure; parent believes work was done with no output
  • Frequency: Observed multiple times; likely under-reported due to no instrumentation
  • Affected workers: All worker types
  • Lifecycle impact: status: completed successfully + output: null passes orchestration lifecycle gates, allowing downstream phases to proceed on empty inputs

Additional information

Workarounds (reduce probability, do not eliminate):

  1. Embed file contents directly in the task prompt to avoid tool paths that may trigger the failure
  2. Use explicit fail-loud preamble: "if access fails, return a diagnostic — do NOT proceed silently"
  3. Inspect child JSONL directly when a spawn returns empty — the data is there

Audit gap: No orchestration.spawn_empty_result event currently exists to instrument this failure class.

Related: #80498 (same failure family)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions