[Bug]: Parent thread shows done while its child's subagents are still running#33482
Area: apps/server
Steps
- Thread A starts task B with
delegate_task. B finishes. - A sends B a follow-up with
t3_thread_send. - In that follow-up, B starts task C with
delegate_task(async) and ends its turn.
Expected: A shows Waiting until C finishes.
Actual: A shows as done (no Working or Waiting) while C is still running. A delegate_task wait on A also returns result_available early.
If B starts C in its first turn instead, it works.
Cause: finalizeAppOwnedSubagent (Orchestrator.ts:13087) keeps only the child's first record open while it is waiting_for_children. The follow-up record closes when B's turn ends.
Version: 0.1.8-nightly.20261109.4399, macOS, Claude provider