Repository navigation
Description
What happened
Two follow-ups sent to the same delegated child both finished, but only one settled. The other stayed waiting with delivery pending and completedAt: null. The parent kept listing it as running background work, and the Lineage panel showed the child as working after it had finished and been archived.
Diagnosis
Follow-ups A and B each start a nested delegate. B's nested completion opens a wake run, and a later nested completion for A is steered into that run automatically. delegatedTaskRuns (RestartBackgroundNote.ts) follows delegatedCompletion.parentRunId on every user message in a run, including one that joined as a steer, so A and B both select that wake as their result run. A publishes a subagent_result transfer from it. finalizeAppOwnedSubagentTask (Orchestrator.ts) looks for an existing transfer by source run and thread pair, not by task, finds A's transfer, and skips B. Later runs do not change B's selected result run, so B never settles.
Steps to reproduce
- Start an async delegated child and wait for its first result.
- Send follow-up A. The child starts a nested delegate and ends its turn.
- Send follow-up B before A settles. The child starts another nested delegate and ends its turn.
- Let A's nested delegate wake the child. During that wake the child starts one more nested delegate for A.
- Let B's nested delegate complete and open a new wake. While it runs, let A's remaining nested delegate complete, so its notice steers into that wake. This needs a provider that steers delegated completions automatically; Codex does.
- Let the wake finish and read both tasks.
We have a deterministic regression test for these steps (scripted Codex adapter, real orchestration services, projections and workers) that fails on main, and can share it.
Version
Observed on 0.1.11-nightly.20261118.4890 with a local change that lets Claude steer delegated completions into a running turn (stock Claude queues them). Reproduced on unmodified main at 2526691ea5 with the test above; main at 8d5e0b241d has the same code.
Environment
Linux x86-64, self-hosted t3 serve. Observed with a Claude parent and child; reproduced with a scripted Codex adapter.
Evidence
| | A | B |
|---|---|---|
| Selected result run | the wake | the wake |
| Transfer from the wake | yes | none |
| Final task row | `completed`, delivered | `waiting`, delivery `pending` |Related issues
#23300 handles a related collision: a queued follow-up promoted to Steer shares the joined run's transfer. Merged locally with main, it does not change this case; its moved-message lookup applies only to a cancelled queued run. #17512 / #22709 and #28448 / #37901 fixed other ways a delegated task stays waiting.
Fix applied or workaround
No workaround found; from the source, task_cancel and task_status leave the row waiting. A local change fixes the reproduction: record the destination task on each result transfer (targetTaskId) and deduplicate on it in the finalizer and in the MCP result lookup, while explicitly promoted follow-ups keep sharing the joined run's transfer. Tested on main with #23300 merged: the regression test and the steering, delegated-completion and Orchestrator* suites pass (287 tests).
Filed by
Measured and written by Claude (Opus 5.5) in T3 Code; posted with the owner's approval.
Activity
Dropje97 commentedon Nov 19, 2026
The regression test for the steps above, as a diff against
main(8d5e0b241d). It adds one case toSteeringCompletion.integration.test.ts,delivers both follow-up results when a nested completion steers into another wake, and fails onmainwith B leftwaiting. Run it fromapps/serverwithpnpm exec vp test run src/orchestration-v2/SteeringCompletion.integration.test.ts -t "delivers both follow-up results".Regression test (330-line diff)
Measured and written by Claude (Opus 5.5) in T3 Code; posted with the owner's approval.