Skip to content

Delegated task: final wake-turn completion never delivered to the parent; task result stays on run 1 #28448

Closed

Description

@collisdigital

Area

apps/server (delegated-task result delivery)

Version

T3 Code 0.1.3, Claude parent (claude-opus-5-5), Claude child (claude-sonnet-5-5).

What happened

A parent thread started a Claude child with delegate_task (mode: "async", isolation: "shared"). Over about an hour, the child ended its turn several times to wait on its own background Bash commands and on two reviewer grandchildren it had started with delegate_task. Each time, Claude Code ran a wake turn later.

The parent received a completion for the original task (run 1). It then received one for each of four later wake turns, delivered under provider-continuation task IDs, for example:

node:delegated-task:provider-continuation%3Amessage%3Athread%3Athread%253Adelegated-task%253Acommand%25253Amcp%25253A5917fdbb-…%25253Adelegate-task%25253A3a4db4d4-…%3Aordinal%3A1%3A<message-id>

The child's last wake turn completed at about 21:57Z, with its final report (PR opened). No completion for it ever reached the parent, and the parent stayed idle. The delivered summaries before it had said things like "yielding until the reviewers finish". The gap was noticed 2h18m later, only because the user asked the parent for status.

task_status on the original task ID at that point:

  • status: completed, workState: result_available, hasPendingChildRuns: false
  • latestTerminalRunId: …:ordinal:10, latestTerminalStatus: completed, and latestTerminalSummary held the final report
  • but summary and resultContextTransferId still held run 1's result ("The full verification run … is still going in the background")

So T3 recorded the final run as terminal but neither delivered it nor promoted it to the task's result.

Expected

Every wake turn's completion, and the final one above all, is delivered to the parent. summary and resultContextTransferId reflect the latest terminal run.

Impact

An orchestrating parent depends on that delivery as its only wake signal, because it is told not to poll. A lost final delivery stalls the whole queue until a human notices. A delegated child cannot work around it by watching its PR for the parent: watch_pull_request is not available to delegated children (see #25764).

Related

Activity

  1. collisdigital commented on Nov 1, 2026

    @collisdigital
    Author

    Not a duplicate of #28444, though the symptom is the same (parent never woken):

    Shared impact: an orchestrating parent that relies on completion delivery stalls with no signal in both cases.

  2. 1kuna commented on Nov 9, 2026

    @1kuna
    Contributor

    Title: Historical frequency evidence for undelivered later child turns

    Problem: A read-only audit of 4,846 finished app-owned delegated tasks on one T3 Code 0.1.6 installation (macOS arm64) found 535 tasks with a child turn requested more than one second after task closure; 520 had at least one such turn complete. No parent notice corresponding to those inspected later turns was found. This includes child turns triggered by peer messages and scheduled checks, not only background-command exits.

    Reproduction or observation: Retained task, run, message, and orchestration-event records were compared; a fresh current-build reproduction was not performed. Runs starting a new delegation on the same reused child thread were excluded. The most common recorded trigger was an MCP send or scheduled check (1,893 turns), followed by grandchild notices (128) and background exits (31).

    After 790 later turns, the parent remained idle for more than 10 minutes. Grouping by parent produced 261 distinct idle windows: median 27 minutes, p90 175 minutes, maximum 25.4 hours; 75 exceeded one hour, 25 exceeded three hours, and seven exceeded six hours. A human message ended 45 windows.

    Caveat: These counts are an upper bound on actionable missed results: many later turns were routine checks, and not every turn was read to distinguish a substantive result from a heartbeat. Three hand-checked cases did contain substantive results that never reached the parent. The measurements describe this installation and historical window, not all installations or a failure rate on current main. Older first-turn summaries and later terminal summaries must also be distinguished; a later result being readable in child history does not mean the parent was notified.

    Proposed behavior: Deliver new substantive child output after task closure exactly once, or reopen/reassociate the task so that its latest result and parent wake remain coherent. Cover peer sends, scheduled checks, grandchild results, and background exits. #24391 and #21877 remain open at this check; please include the peer-message/scheduled-check path when assessing coverage.

    Why native: T3 knows the child-to-parent relationship and each run's terminal transition. Polling a task's original summary is not a replacement for reliable event-driven delivery.

  3. Aplietexe commented on Nov 10, 2026

    @Aplietexe

    A data point from 0.1.8 (Windows desktop app, WSL runtime, Claude Code 2.1.322), with minimal repros. It narrows down when the final result is lost.

    • Final turn started by a background Bash command: delivered. A Sonnet 5.5 child (async delegate_task) ran sleep 45 with run_in_background, marked it with t3_background_wait, and ended its turn. On waking, it ran a second sleep 30 the same way, then replied FINAL. The parent got three deliveries. The last one was FINAL, under a provider-continuation task ID. So I couldn't reproduce the lost Bash wake turn in this simple case.
    • Final turn started by a Monitor event: not delivered. The child started a Monitor running sleep 60; echo MONITOR_DONE, marked it, and ended its turn with WAITING. It replied FINAL when the Monitor fired. The parent was woken once, after the Monitor ended, with WAITING. FINAL never arrived. Without the mark, the same WAITING was delivered at the first turn end instead, and nothing followed.

    The task_status section of docs/orchestration-v2/orchestrator-mcp-server.md says latestTerminal* exposes later "non-monitor results", so the Monitor case may be by design. Either way, a child loses its final report whenever its last wait was a Monitor.

    Drafted with Claude (Opus 5.5) in T3 Code; the repro ran on my install.

  4. SSafet commented on Nov 16, 2026

    @SSafet

    Claude Opus 5.5 wrote this comment in T3 Code for the account owner. It ran both tests on this machine and took the times from its statev2.sqlite, read-only.

    This still happens on 0.1.10-nightly.20261114.4709 (dfd2187ccb0f), which already includes #34568 and #36339. It's the marked Monitor case from the 0.1.8 comment above. On this build, a child that marks its Monitor with t3_background_wait loses its final answer. A child that leaves the Monitor unmarked gets its final answer through.

    I used macOS 27.2 arm64, the desktop app and Claude Code 2.1.325. Parent and child were both Claude Agent claude-opus-5-5, started with async delegate_task and shared isolation. Both tests ran on 16 Nov, test B first. Times are UTC.

    Test A, Monitor marked

    The child starts a Monitor (persistent: false, for i in 1 2; do sleep 25; echo tick $i; done), calls t3_background_wait with its task ID, which returns matched, and ends its turn with INTERIM A. On tick 1 it marks the Monitor again and ends with INTERIM B. When the Monitor finishes, it replies FINAL.

    Time Child Parent
    12:33:17 Run 1 marks the Monitor and ends with INTERIM A Nothing, as it should be
    12:33:39 Run 2 starts on Monitor output (updated) and ends with INTERIM B Nothing, as it should be
    12:34:04 Run 3 starts on Monitor "probe2 ticks" finished (completed)
    12:34:06.25 Run 3 ends with FINAL
    12:34:06.32 The only notice, Delegated task "Repro probe 2: marked monitor" finished, outcome completed, text INTERIM A

    Afterwards task_status showed status: completed, workState: result_available, summary: "INTERIM A", latestTerminalRunId pointing at run 1, and latestTerminalSummary: null. There was one subagent row, completed at 12:34:06.289. The parent never got FINAL.

    Test B, same Monitor, unmarked

    Time Child Parent
    12:29:33 Run 1 starts sleep 30 in the background, marks it and ends with INTERIM 1 Nothing, as it should be
    12:29:59 Run 2 starts when the command finishes, starts the same Monitor without t3_background_wait
    12:30:08.33 Run 2 ends with INTERIM 2
    12:30:08.36 Notice 1, outcome completed, text INTERIM 2. Expected for an unmarked Monitor
    12:30:31 Run 3 starts on Monitor output and ends with INTERIM 3 Nothing
    12:30:55 Run 4 starts on Monitor "probe ticks" finished, and a follow-up subagent row starts
    12:31:02 Run 4 ends with FINAL Notice 2, text FINAL, under a provider-continuation task ID. This is the #36339 path

    T3's Claude instructions say "To wait for a background command or Monitor you started (tests, a build), call t3_background_wait". The tool's own error text asks for "the task ID of a background command or Monitor you started". So the child that follows the instructions is the one that loses its answer.

    This may be the documented rule and not a slip. orchestrator-mcp-server.md says the published summary stays the same across later follow-ups, and that latestTerminal* only shows "non-monitor results". If that rule covers the run a Monitor wakes inside a held task, test A does what the docs say, and I think the rule should change. A held task hasn't published a result yet, so its result should come from the run that ends the hold. Since #36339, a run woken by a Monitor finishing counts as a result when the Monitor is unmarked. It should count when the Monitor is marked too.

    I saw what this costs once, on an older nightly, 0.1.10-nightly.20261111.4544, which predates #34568 and #36339. A child's last run started when a Monitor finished, and when that run ended the parent got no notice. The parent sat idle for about 7.9 hours until the user asked.

    I'd expect that when a held task settles after a run woken by a Monitor finishing, summary, resultContextTransferId and latestTerminal* hold that run's answer, and the parent's notice carries it, the way notice 2 does in test B.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions