Skip to content

[Bug]: Subagent handoff stalls after delivered child result #110572

Description

@steipete

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

The subagent-handoff QA scenario can stall after the child subagent succeeds and its completion is delivered; the parent session never synthesizes the required final answer.

Steps to reproduce

  1. From an OpenClaw source checkout, run:
    node scripts/run-node.mjs qa suite --provider-mode mock-openai --model openai/gpt-5.4 --alt-model openai/gpt-5.4 --scenario subagent-handoff --output-dir .artifacts/qa-e2e/subagent-handoff-mock-diagnostics
  2. Wait for the scenario timeout.
  3. Open .artifacts/qa-e2e/subagent-handoff-mock-diagnostics/qa-suite-report.md.

Expected behavior

After the child subagent returns ok, the requester session should produce the final response with Delegated task, Result, and Evidence sections.

Actual behavior

The scenario times out waiting for the parent final response. The artifact shows one child task with status":"succeeded", deliveryStatus":"delivered", and progressSummary":"ok", while recent outbound messages only include qa-operator:ok and a protocol note.

OpenClaw version

2026.7.2 source checkout, observed at cad4e395d21f while stress-testing the QA scenario lane.

Operating system

macOS, local Codex worktree.

Install method

Source checkout via repo command wrappers.

Model

openai/gpt-5.4 in mock-openai provider mode for deterministic repro. A related live OpenAI stress run also showed intermittent stalls on the single-child handoff path before retry masked it.

Provider / routing chain

OpenClaw QA Lab -> qa-channel -> mock-openai provider for the deterministic repro.

Additional provider/model setup details

No real API key is needed for the deterministic repro. Live stress used the regular OpenAI route but is not required to reproduce this issue.

Logs

QA suite report: .artifacts/qa-e2e/subagent-handoff-mock-diagnostics/qa-suite-report.md
Status: fail
Details: subagent handoff stalled: timed out after 45000ms; outbound=qa-operator:ok | qa-operator:Protocol note: acknowledged. Continue with the QA scenario plan and report worked, failed, and blocked items. tasks={"count":1,"runtime":"subagent","status":null,"tasks":[{"runtime":"subagent","requesterSessionKey":"agent:qa:subagent","status":"succeeded","deliveryStatus":"delivered","progressSummary":"ok"}]}

Screenshots, recordings, and evidence

Deterministic local artifact path from this run:
.artifacts/qa-e2e/subagent-handoff-mock-diagnostics/qa-suite-report.md

Related live stress evidence from earlier runs: the same scenario passed only after retry on live OpenAI, which suggests the child completion path is timing-sensitive.

Impact and severity

Affected: subagent requester sessions and QA Lab subagent handoff coverage.
Severity: Medium to high for delegation workflows because the child work succeeds but the parent can remain stuck waiting.
Frequency: Deterministic in the mock QA repro above; intermittent in live stress before retry.
Consequence: missed final answers, slow QA failures, and retries masking a real requester wake/synthesis defect.

Additional information

A first attempted fix using process-local yield markers was rejected by autoreview due race/stale-marker risks. Likely best fix should be durable/structured: sessions_yield or the registry should re-evaluate already-settled direct child runs for the current requester turn instead of relying on transcript text or process-local intent.

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.maintainerMaintainer-authored PR

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions