[Bug]: "Waiting on subagent" chip stuck after t3_thread_send steers into a running delegated child turn; Stop and task_cancel do nothing #19002
Before submitting#
- I searched existing issues and did not find a duplicate. Related but distinct: #17847 and #18877 (native Claude
Agent/ Workflow tasks that stay running after astoppednotification). This report is about an app-owned node created byt3_thread_sendto a delegated task's child thread. No native Claude task is involved. - I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
- In a Claude-provider parent thread, start an async delegated task with
delegate_task. The child thread starts run 1. - Later, send the child thread more messages with
t3_thread_sendwhile it is working. Several of these sends had their own clientRequestIds (e.g.ob2-r2b-a10-brief-1,ob2-r2b-wake-1509,ob2-r2b-shipmode-1735). Each one creates anapp_ownedrow inorchestration_v2_projection_subagentson the parent thread. - Send one message (
ob2-r2b-shipmode-1735) while a child run is already running (child run ordinal 6 started 14:15:19Z and completed 15:45:40Z, and this send arrived at 14:35:46Z). The message is taken into the running turn, and no new child run starts. - The child run completes, and the child thread goes to
completedwith nothing queued.
Expected behavior#
When the child run that took in the message ends, the app-owned subagent node for that send settles as completed. The parent's composer chip then disappears. If it does not, Stop on the chip clears it.
Actual behavior#
- The node for that send stays
status = running,completed_at = NULLandupdated_at = 2026-10-11T14:35:46Z, two days later. Earlier sends that each started their own child run settled correctly (completed/failed). - The parent composer shows "Waiting on subagent QA · … round 2b … Stop" for good.
- Pressing Stop does nothing.
- From the parent thread,
task_statusandtask_cancelwith the delegated task id both returntask_not_found: Delegated task command:mcp:46fd3593-…:delegate-task:… does not belong to thread <parent>. This happens even though the projection row'sthread_idis that parent. The task id embeds an earlier MCP session id (46fd3593…), and later sends came from other MCP session ids (5961d868…,71a8bf13…). The id-to-thread lookup seems to fail after the MCP session changes. t3_thread_organize settleon the child thread does not clear the chip.
Projection row (parent = this thread):
subagent_id node:delegated-task:command%3Amcp%3A71a8bf13-…%3Athread-send%3Aob2-r2b-shipmode-1735
origin app_owned
status running
started_at 2026-10-11T14:35:46.066Z
completed_at NULL
run_id run:thread:<parent>:ordinal:37
Child thread: status completed, last run ordinal 6 completed at 2026-10-11T15:45:40Z, queue empty, activeRunId null.
Possible cause: a t3_thread_send that steers into an already-running child turn creates a subagent node, but nothing ties that node to the turn that took the message in. So the turn's completion never settles it. Separately, the delegated-task ownership check fails after the parent's MCP session id changes.
Impact#
Minor bug or occasional failure
Version or commit#
T3 Code (Nightly) 0.0.46-nightly.20261013.3053
Environment#
macOS (Darwin 27.0.0), Claude provider. Parent on Opus 5.5, child on Sonnet 5.5. The parent thread has gone through several compactions and T3 restarts since the task was created.
Workaround#
None found. Stop, task_cancel and settling the child thread all fail to clear the chip.
juliusmarminge added labelsaccepted
juliusmarminge added labelsbug
juliusmarminge added labelsvia-triage
Confirmed another occurrence on
0.0.46-nightly.20261014.3132, with a Codex parent and an OpenCode/Muse child, observed on Android connected to a Linux x64 desktop server.This matches the steered-send path in this issue. The task APIs find the correct
node:delegated-task:...ID; there is notask_not_foundin this occurrence.Observed sequence (2026-10-16, UTC):
- An async
delegate_taskchild finished its initial turn. A later child run handled completion of its background image build. - The parent sent an implementation follow-up using
t3_thread_send(mode="auto"). Its response explicitly returneddelivery: "steered", child runordinal:2, and a new task ID ending inthread-send:...cleanup.... - Child run 2 completed at 13:44:22.680Z, with its final result available and subsequently read and used by the parent.
- The follow-up's
task_statusreports:
{ "status": "completed", "workState": "result_available", "hasPendingChildRuns": false, "latestTerminalStatus": "completed" }t3_thread_readon the child reportsstatus: "completed",activeRunId: null, andpendingRequestCount: 0. Both child runs are completed.- However, reading the parent activity timeline still returns the follow-up's
type: "subagent"item withstatus: "running". A full scan of the parent found exactly two nonterminal subagent items: this stale follow-up and one genuinely running packaging task. The Android composer therefore says “Waiting on 2 subagents”, next to a1/1counter (the separate display mismatch in #16425).
Recovery attempts, all verified through the APIs:
t3_thread_organize(action="settle", threadId=<child>)succeeded. Child now reportssettled: true,completed, no active run. The parent subagent item remainsrunning.task_cancelusing the follow-up's correctnode:delegated-task:...thread-send...task ID returnsstatus: "completed". Re-reading the parent item still reportsrunning.- No server restart or direct database mutation was attempted.
Parent provider/model:
codex/gpt-6.1-sol. Child:opencode/opencode-go/muse-spark-1.3-contributor,variant: xhigh.This supplies a cross-provider reproduction and confirms that correct task-ID lookup can succeed while the stale parent item still cannot be cleared by the exposed controls. No lost work is claimed: the result was recovered and consumed; the remaining defect is the parent status/wait count.
Reported by GPT-6.1-Sol through the Codex harness in T3 Code, on the user's behalf. Private thread IDs, paths, conversation contents, and credentials omitted.
- An async
Note
Grok responding on behalf of Julius.
Closing this as fixed on
mainby two merged PRs. #19019 stops a steeredt3_thread_sendfrom creating a follow-up task that can never settle, so the "Waiting on subagent" chip no longer gets stuck that way. #20310 makes parent Stop cancel any orphaned follow-up that's already stuck, so existing stale chips can be cleared. If you still see a stuck chip on a build that includes both, please open a new issue with the steps.juliusmarminge closed this
Sign in to join this conversation.
Note
Grok responding on behalf of Julius.
This is a real bug, but only your first hunch holds on
main. The second one doesn't.Confirmed: steered sends are never settled. Delegated-task settlement only matches a node through a child run whose
delegatedTaskIdequals the node id: thesubagent-resultscheck inProjectionStore.ts, plusdirectAppOwnedChildTasks/readTaskinOrchestratorMcpService.ts. Whent3_thread_sendsteers into a child run that's already going (delivery: "steered"), no new run is created. The absorbing run keeps its earlierdelegatedTaskId, so the send'sapp_ownednode never matches a terminal run and staysrunning. Stop can't help either:stopDelegatedTasksonly sendsthread.stopto the child thread, which is already idle, and never settles the node itself.Not reproduced: the session-id theory.
readTaskchecks onlycandidate.id === taskIdandcandidate.threadId === <parent>. The MCP session id isn't checked anywhere. The id you passed (command:mcp:46fd…:delegate-task:…) is the command id. Task ids look likenode:delegated-task:…, as in your projection row. Please retrytask_status/task_cancelwith thatnode:id and tell us if it still fails.Workaround: none from the UI for now. The fix would tie a steered send's node to the run that absorbs it, or skip creating a separate node for steered delivery, and let Stop settle stuck app-owned nodes whose child is idle. Related: #17847, #18877 (native tasks, different path).