You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remote delegated tasks don't notify the parent of follow-up runs on the child thread #31707
fresh start on my Linux box delegated an iOS build check to my Mac (delegate_task with target.environmentId). The child's first run ended blocked (no simulator runtime), the parent woke up and reported that, and suggested I reply directly in the child's thread. I installed the simulator and continued there: the child ran the build (it succeeded) and finished. The parent never woke up for any of that and still believes the Mac agent is blocked.
Diagnosis
A remote delegation follows only the run it launched, then goes deaf. RemoteDelegation.followOnce waits on remoteChild.runId (ordinal:1) via waitForThread, completes the task when that run ends, and the follower ends (apps/server/src/peer/RemoteDelegation.ts). Later runs on the child never re-notify the parent. Local delegation has parity: recordSubagentFollowup (apps/server/src/orchestration-v2/Orchestrator.ts) creates a new parent subagent with completionWake: "always" when a follow-up starts a new run on a finished delegated child. Remote children can't hit that path (top-level thread there, no parent linkage). The docstring promises the missing parity: "a follower completes it when the thread there ends, so the parent wakes as it would for a local child" (RemoteDelegation.ts:64-67). Here: subagent completed 21:25:37Z off child run 1 (delivered; parent run 202 said "blocked"); child runs 2 (build OK) and 3 (done 22:10:48Z) produced no wake; trace shows no child wait/notify at 22:10. First wake worked as coded; follow-ups untracked.
Steps to reproduce
Link environments A and B. 2. On A, delegate_task with target.environmentId=B. 3. Let child run 1 complete; parent wakes. 4. Send a user message in the child thread on B (new run). 5. Let it complete. 6. Observe: no parent notification/wake. Compare local delegate_task, where the parent is re-woken (recordSubagentFollowup).
Version
0.1.7 (local server 0.1.7 and linked Mac server 0.1.7; Desktop 0.1.7)
Environment
Parent: Desktop 0.1.7 Linux x64, server 0.1.7, Node v24.22.1, claudeAgent/opus-5-5. Child: server 0.1.7 macOS arm64, claudeAgent/sonnet-5-5.
Evidence
subagent driver=remote status=completed completed_at=2026-11-05T21:25:37.292Z; remoteChild runId=..:ordinal:1 stoppedThere=true; delivery=delivered; child runs: #1 done 21:25:37Z, #2 21:35-22:07Z (build OK), #3 done 22:10:48Z; parent ends at run 202 (21:25:50Z), no later wake; trace: no child wait/notify at 22:10.
Related issues
#21060 (Grok stuck-Working, different symptom), #30469 (Working indicator). No duplicate found; RemoteDelegation.ts unchanged since v0.1.7.
Fix applied or workaround
None run on machine. Ask the parent to re-read the child (t3_thread_read + environmentId), or relay the result yourself.
Filed by
muse-spark-1.3-contributor via t3 triage (Muse Code harness)
Another trigger for the same gap, which I hit far more often than a user follow-up: the remote child's own background work starts the next run.
A Claude child on a linked Linux machine (parent on Windows, delegate_task with target.environmentId) starts a long test run as a background command and ends its first turn with an interim note. The background command's completion then wakes the child, which continues in run 2 and writes the actual report there.
One example from today, on the child thread:
run 1 completed 01:39:18Z, ending with "The full orchestration-v2 run is still in the background. I'll finish the report when it reports back."
run 2 started 01:43:46Z (no user message, woken by the finished background command) and completed 01:44:40Z with the real result.
The parent was woken once, at the end of run 1. task_status reported status: completed / workState: result_available with the interim note as its summary, and nothing arrived for run 2. It happened on 3 of 11 remote delegations today, and once the day before. Each time I recovered with t3_thread_wait(untilDelegatedWorkSettled: true) on the child thread and read the final message myself.
So with followOnce following only the launched run, any remote delegate that leaves background work hands back an interim result as its final one. That is the default way agents run long builds and tests. Following until the child thread has settled (no active run, no pending background tasks or owed wake) would cover both this and the user follow-up described above.
Reproduced both triggers on v0.1.9, with the parent on a Linux server and the child in a Vercel Sandbox, linked over Tailscale (--access auto, child claudeAgent).
The child moved sleep 60 into a background task and ended run 1 with "Waiting for the background task to finish."
The follower waited until the background work ended (05:55:37.77Z). It then completed the task with run 1's interim text.
Run 2 started about 30 ms later (05:55:37.8Z to 05:55:40.1Z) and wrote the real answer. The parent never received it; we got it only by reading the remote thread.
User follow-up: a t3_thread_send to the finished remote child started a new run, which finished. The parent did not wake (still nothing 8 minutes later). I see #26776 shipped in v0.1.10 for this case.
Is #31744 still the planned fix for the background-wake case? It's the main thing that stops us from running sandboxed builder agents as linked environments. Builders run tests and dev servers in the background, so the parent often gets the interim note as the final result.
On the background-wake question: I checked locally whether #31744 covers it (fixture tests only, no live two-server run).
PR head 5258d9f655: a test where the remote child's run 1 ends with an interim note and a later run, started by no message, ends ~30 ms later with the final text produces a second task with that text (completionWake: "always"), and the parent wakes again. On the child side, afterRunId counts a run started by a Claude background-command wake (notification.source.kind: "command"); a monitor-sourced wake is skipped by design.
Two caveats with #31744: the parent still gets run 1's interim text as a completed result first, and the PR no longer merges cleanly into main (conflicts in 8 files, overlapping with #26776, #37332 and #32331). The test patch is available if useful.
Activity
MikaMcFlurry commentedon Nov 12, 2026
Another trigger for the same gap, which I hit far more often than a user follow-up: the remote child's own background work starts the next run.
A Claude child on a linked Linux machine (parent on Windows,
delegate_taskwithtarget.environmentId) starts a long test run as a background command and ends its first turn with an interim note. The background command's completion then wakes the child, which continues in run 2 and writes the actual report there.One example from today, on the child thread:
orchestration-v2run is still in the background. I'll finish the report when it reports back."The parent was woken once, at the end of run 1.
task_statusreportedstatus: completed/workState: result_availablewith the interim note as its summary, and nothing arrived for run 2. It happened on 3 of 11 remote delegations today, and once the day before. Each time I recovered witht3_thread_wait(untilDelegatedWorkSettled: true)on the child thread and read the final message myself.So with
followOncefollowing only the launched run, any remote delegate that leaves background work hands back an interim result as its final one. That is the default way agents run long builds and tests. Following until the child thread has settled (no active run, no pending background tasks or owed wake) would cover both this and the user follow-up described above.swarajban commentedon Nov 18, 2026
Reproduced both triggers on v0.1.9, with the parent on a Linux server and the child in a Vercel Sandbox, linked over Tailscale (
--access auto, childclaudeAgent).Background-wake run (the case #32563 described):
sleep 60into a background task and ended run 1 with "Waiting for the background task to finish."User follow-up: a
t3_thread_sendto the finished remote child started a new run, which finished. The parent did not wake (still nothing 8 minutes later). I see #26776 shipped in v0.1.10 for this case.Is #31744 still the planned fix for the background-wake case? It's the main thing that stops us from running sandboxed builder agents as linked environments. Builders run tests and dev servers in the background, so the parent often gets the interim note as the final result.
MikaMcFlurry commentedon Nov 18, 2026
On the background-wake question: I checked locally whether #31744 covers it (fixture tests only, no live two-server run).
5258d9f655: a test where the remote child's run 1 ends with an interim note and a later run, started by no message, ends ~30 ms later with the final text produces a second task with that text (completionWake: "always"), and the parent wakes again. On the child side,afterRunIdcounts a run started by a Claude background-command wake (notification.source.kind: "command"); amonitor-sourced wake is skipped by design.70e4319da8: the same test never sees the final text. The follower completes the task on run 1's interim text and stops observing; the fix(server): a follow-up to a finished remote task is a new task that wakes the parent #26776 path only coverst3_thread_send.Two caveats with #31744: the parent still gets run 1's interim text as a completed result first, and the PR no longer merges cleanly into main (conflicts in 8 files, overlapping with #26776, #37332 and #32331). The test patch is available if useful.