[Bug]: A delegated child's final result written in a PR-watch wake-up turn never reaches the parent; task_status keeps the interim result#24326

opened5d agobyJJulius Marminge

What happens

A delegated child (delegate_task, async) ends its first turn with an interim message and an open PR watch (watch_pull_request). The parent receives that interim completion. The PR watch then wakes the child with app-owned follow-up turns; in those turns the child finishes the job and writes its final result. That final result is never delivered to the parent: no completion notification, and task_status keeps the interim result. The parent's record of the task stays at the interim state until someone reads the child thread by hand.

Evidence

  • Issue lead for #21789 on fs-26 (Codex gpt-6.1-sol): first turn ended 2026-10-22 11:32Z with "PR #23568 open, watching CI". The dispatcher logged exactly that. The watch wake-ups ran four more turns until 12:04Z: all checks green, label applied, proof audit passed, final line written. The dispatcher never heard about it and the lead's slot stayed claimed for 40 hours.
  • A sweep on 2026-10-24 over 94 delegated issue leads found 71 in this state: the child thread's last turn is a completed PR-watch turn with a terminal ISSUE_* line, and the parent still holds the interim result. 43 open friction entries from dispatchers say the same ("lead-23964-r1b completed without a terminal line while its PR watch was open", "lead was not woken by its PR watch; dispatcher …").

Related but different: #21772 covers a provider-initiated background command waking the child; #21837 covers an app-owned follow-up publishing INTERIM while nested work runs. This one is the plain case: the follow-up turns are T3's own PR-watch wake-ups and the parent is simply never told their result.

Expected

When a delegated child's PR-watch (or any app-owned) follow-up turn completes, deliver that turn's result to the parent as a new completion (or update the task result and notify), so the parent sees the final state without reading the child thread. At minimum task_status should report that a later turn completed after the result it holds.

Where

T3 Code MCP delegate_task to a linked environment (Freestyle VMs), watch_pull_request in the child, Codex provider, server from the 2026-10-22 preview rollout.

Checked current main dd5b5401e1 with the real web/dev server on Linux. Codex children launched in both wait and async modes had no watch_pull_request or unwatch_pull_request tools; the async completion woke its parent with the result. The reported PR-watch sequence is no longer available after e641761e2a: PR watching belongs to the parent.

The focused HTTP tool-visibility check passed (1 test), as did the background-follow-up delivery checks (2 tests). Runtime transcript. This used same-environment delegation; existing legacy watches and linked-environment replay were not exercised. Closing as addressed by the child-watch removal on main.