A finished child's queued question runs after the parent's final turn and replaces its result#25637

opened9d agobyJJulius Marminge

What happened

A delegated child's "asked a question" notification stays queued on the parent after the asking child has finished. It then runs as a new turn after the parent's final turn, so the parent's latest result is the answer to a stale question, not its outcome.

Issue lead for pingdotgg/t3code#25194 on fs-19 (Codex, 0.1.2-preview.20261022.3511), thread mcp:launch:client%3A65bc2764-e023-4047-9b26-6cb8bf7587b1:fwd%3A0c07bcd420bca0fc049f2fe90fd851e0da87931d05ba01f6ebf791a73cbfb586:

UTC 2026-10-26
02:48:33, 02:57:31Delegated task …25194-proof-2 asked a question and is still working. Each queues a run (runs 2 and 3) behind the lead's running run 1.
03:05:2025194-proof-2 completes.
03:06:47Run 1's last message: the lead's terminal result (fix PR #25272 opened, tests and audits passed). Run 1 completes at 03:06:53.
03:06:58–03:07:09Run 2 starts: "Answered the delayed question: capture and audit already finished."
03:07:14–03:07:24Run 3: "Answered with the exact theme setup and clarified that the audit is complete."

The dispatcher reads the lead's latest result and found no outcome. The round was recorded needs_julius / "no ISSUE outcome" and PR #25272 was never recorded. Issue lead #25391 r2 on fs-23 hit the same thing at 09:28:36Z ("Delegated task … asked a question and is still working" after its terminal line). That round was recorded lost and only noticed 11 h later. In the fleet ledger, 17 "vanished" and 3 "no outcome" lead rounds fall in the same window. The two read end to end were both this case.

Expected

  • When the asking child completes, or its question is answered or closed, the queued question notification is dropped or marked stale instead of starting a new turn.
  • A run started only to deliver such a notification doesn't replace the thread's last real result as seen by its own parent (delegate_task result / task_status).

Where

  • apps/server/src/orchestration-v2/DelegatedTaskQuestionReactor.ts:41 (origin/main fe507c5a1e) queues the notification. Nothing ties its run to the question's lifetime.

Related: #24297 and #24326 (wrong turn delivered as the child's result), #24096, #24593.