Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Related, but each covers a different part: #12694 (closed) is Claude's built-in subagents stopping on session replacement, not delegate_task children. #32235 is task_not_found after the parent's MCP session changes. #30156 is a background task lost with no wake when the provider process exits.
Area
apps/server
Steps to reproduce
Observed once in a real session. Not yet re-run as a minimal repro.
- In a Claude thread, call
delegate_tasktwice withmode: "async"(one withisolation: "worktree", one withisolation: "shared"). Let the parent's turn end while both children run. - Send the parent a new message. While that turn is running, press Stop. (In my case the turn had hit "Claude API rate limit" and was retrying.)
- Send another message to the parent and let it continue normally.
- Wait for the children to report back.
Expected behavior
Either:
- async children keep running when the parent's turn is stopped, since they were started as independent work, or
- if Stop is meant to stop them too, the parent is told. Its next turn should get a note naming the delegated tasks that were stopped, like the "T3 Code restarted and stopped background work" note. Either way,
task_statusshould answerinterruptedfor them, nottask_not_found.
Actual behavior
- Both children stopped at the moment of the Stop. The parent's timeline records the Stop at 09:33:00 UTC ("Interrupt requested, Stopped by user"). Both subagent items then change to
status: "interrupted"at 09:33:05 and 09:33:06. One child's e2e test run in its worktree was killed by SIGTERM at the same time, with its last commits left in place and three files uncommitted. - No completion, failure or interruption notice reached the parent, then or later.
- Delegated tasks started after the Stop, from the same parent, reported back normally.
- Over the next 5h40m the parent agent told the user five times that both children were "still running", and gave an ETA built on them. When asked for status, it reasoned that the instructions say not to poll a running delegate and to wait for the completion notice, and that no notice had arrived. So it did not check.
- When it finally checked, after a context compaction:
t3_thread_readon both child thread ids returnedthread_not_found("is no longer available"), andtask_statuswith both task ids returnedtask_not_found("does not belong to thread ").
So the user loses the children's work, the parent is never told, and the ids it holds stop resolving. Together with the "don't poll delegates" instruction, the agent has no signal that the work is gone.
Impact
Major degradation or frequent failure
Version or commit
Server reports 0.1.9-nightly.20261111.4501 (incident on 2026-11-11)
Environment
Self-hosted server on Linux x64 (cloud VM), used from the web app and the Android app. Claude provider (claudeAgent), model claude-opus-5-5, runtime mode full-access.
Logs or stack traces
# Parent thread timeline (t3_thread_read, view=activity), UTC
09:27:16 dynamic_tool delegate_task "Review ..." isolation=shared mode=async
09:31:51 user_message (new message to the parent)
09:33:00 run_interrupt_request "Stopped by user"
09:33:01 error "Provider retry stopped: Claude API rate limit."
09:33:01 run_interrupt_result interrupted
09:33:05 subagent "M3 ..." status=interrupted (started 08:27:49, isolation=worktree mode=async)
09:33:06 subagent "Review ..." status=interrupted
# Later, in a turn after compaction
t3_thread_read thread:delegated-task:command:mcp:<id>:delegate-task:<task>
-> thread_not_found: "... is no longer available."
task_status <task uuid>
-> task_not_found: "Delegated task <uuid> does not belong to thread <parent>."Workaround
Before trusting that a delegated task is still running, check its worktree or output on disk. Avoid pressing Stop on a parent while it has async delegates running.
Activity
chengbuilds commentedon Nov 22, 2026
Hit this again today. Adding one more data point.
0.1.12-nightly.20261122.5085, Windows 11, Claude provider.delegate_taskchild running in the background (isolation: "worktree",claude-opus-5-5). The parent's own turn had already ended.interruptedand summaryStopped by user. It was mid-edit with uncommitted work.Difference from the original report: here
task_statusstill resolved the task id. It returnedstatus: "interrupted", andhasPendingChildRuns: trueafter the manual resume.From the user's side, Stop was meant for the one message just sent. Stopping work that was started in an earlier turn was a surprise.
Project516 commentedon Nov 22, 2026
claude-opus-5-5 responding on behalf of project516
One possible contributor to the
task_not_foundpart of this issue: on 0.1.11 the same error came back after a compaction because the agent passed a task id it had rebuilt from the child thread link (command:mcp:...:delegate-task:...), not thenode:delegated-task:...id thatdelegate_taskreturned.task_statusgives the same "does not belong to thread" message for an unknown id, so this looks like lost ownership even when the task record is intact. Details in #40875.The
thread_not_foundon the child thread ids reported here is not explained by this.juliusmarminge commentedon Nov 23, 2026
#34499, now on main: After Stop interrupts delegated children, the parent's next eligible turn receives a note naming them, and interrupted background child work is classified as interrupted rather than completed.
Not done: The reported task_status task_not_found and child-thread thread_not_found failures remain outside this merge.
Closing; open a new issue if what is left still matters to you.