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.
Area
apps/server
Steps to reproduce
- On a local
t3 serve(macOS, not SSH-launched), a Claude (Opus 5.5) parent thread callsdelegate_taskwithmode: "async", targetgrok/grok-4.7, full-access. - The Grok child works for 20 to 60 minutes and finishes with a final assistant message.
- Repeat across several children. On 2026-10-05 this happened to about 1 in 4 Grok children; there was no reliable single-run repro.
Expected behavior
When the Grok turn ends, the child run and its provider turn become terminal (completed), task_status returns result_available, and the parent thread is woken with the result.
Actual behavior
The Grok adapter receives the end of the turn, but the run never projects it:
- The provider event log shows
session/promptgoing fromstartedtofailedwitherrorTag: "Interrupt"at the same millisecond as the child's finalassistant_messageitem. Every Grok turn in my logs ends with this same event (164 of 164), including turns that complete normally. - For most children,
orchestration_v2_projection_runsand..._provider_turnsswitch tocompletedat that timestamp. - For the affected children, both stay
runningwithcompleted_at = NULL.task_statusreportsstatus: "running",workState: "working", andsummary: null, and the parent is never notified. The threadupdatedAtkeeps moving, so the child looks alive in the Lineage panel ("Running 1h 27m"). - The server process ran the whole time (started 00:46 UTC and not restarted), so this is not [Bug]: Remote (SSH-launched) server dies on client disconnect, delegated subagents reported as cancelled #15608.
- The only way out was
task_cancelfrom the parent. That marks the runinterruptedeven though the work had finished with a result.
Server-side spans for the affected minute had already rotated out of server.trace.ndjson by the time I looked (10 files of about 1 minute each), so I can't show what dropped the terminal.
Impact
Major degradation or frequent failure
Version or commit
0.0.46-nightly.20261004.2644
Environment
macOS 26.2 (Darwin 25.2.0), Mac mini, local t3 serve --host 127.0.0.1 --port 3773. Parent: claudeAgent (claude-opus-5-5). Children: grok (grok-4.7, reasoningEffort high) over ACP via t3 acp-mcp-bridge.
Logs or stack traces
# provider event log: the turn ends at the same instant as the final assistant item
2026-10-05T01:01:19.820Z grok thread ...delegate-task%3Atop-568-fix-r2 session/prompt started
2026-10-05T01:27:47.661Z grok thread ...delegate-task%3Atop-568-fix-r2 session/prompt failed errorTag=Interrupt
# final assistant_message item updatedAt 2026-10-05T01:27:47.662Z
2026-10-05T01:28:21.466Z grok thread ...delegate-task%3Atop-566-impl-r1 session/prompt started
2026-10-05T01:49:39.882Z grok thread ...delegate-task%3Atop-566-impl-r1 session/prompt failed errorTag=Interrupt
# final assistant_message item updatedAt 2026-10-05T01:49:39.882Z
# statev2.sqlite (read-only), grok delegated runs requested since 2026-10-03
grok|completed|85
grok|running|10 # several have the turn-end event above and are still running
grok|interrupted|21 # includes the two above, after a manual task_cancel at 03:50Z
grok|cancelled|14
# same end event, different projection outcome
top-567-verify-r4 prompt end 01:05:39.454Z -> run completed 01:05:39.560Z
afp-mine-q1 prompt end 01:25:27.678Z -> run completed
afp-mine-census prompt end 01:30:20.673Z -> run still running (as of 04:07Z)
afp-mine-perf prompt end 01:32:36.312Z -> run still running
agent-arch-owner-u1-r1 prompt end 02:30:59.434Z -> run still running
agent-arch-owner-u14-r2 prompt end 02:54:46.062Z -> run still running
afr-phase4-owner-pr1-v1 prompt end 03:09:51.862Z -> run still runningWorkaround
The parent polls with t3_thread_read instead of trusting task_status. If the last item is a completed final assistant_message, it treats the child as done and calls task_cancel to free the run. A schedule_task interval bound to the parent thread runs that check every 20 minutes.
Possibly related: #15298 (the Claude adapter settles a turn whose end never reaches the projection), #14434 (runless child turns are not recovered), #13490 (the parent is not notified when a child finishes a follow-up turn).
Activity
juliusmarminge commentedon Oct 5, 2026
Note
Grok responding on behalf of Julius.
Triage
Thanks for the thorough report and the DB detail, @topitopongsala!
What I found
session/promptfailed/errorTag: Interruptline looks like noise, not the failure.makeXAiPromptCompletionRuntimesettles the turn fromturn_completed/x.ai/session/prompt_complete, then interrupts the still-open RPC, and the native log records that interrupt. That's why every turn, including the ones that complete normally, ends the same way.running. The parent wake is tied to the child run becoming terminal, so it never fires.deferFinalizeForBackgroundWork). On prompt settlement, if a non-persistent background tool or a subagent is stillpending/running, the adapter markspromptSettledand returns without emitting a terminal or arming the 3s debounce. A later completion is supposed to callrearmDeferredFinalize, but two cases never do:task_completedis ignored untilpromptSettled(finishRegisteredBackgroundTool). If it arrives first, it's dropped, the tool staysrunning, and settlement then pins the run.running/pendingpins the run the same way, with no timeout (unlike hydration at 60s and injected reports at 25s).task_cancelstill reaches a live turn here (Grok hard-restarts andinterruptTurnfinalizes it asinterrupted), which matches what you saw and is why the finished result gets discarded. That's different from fix(server): Stop ends a run whose turn its adapter already settled #15298, where the adapter had already dropped its active turn. It also doesn't look like Feature: Parent is never notified when a delegated child finishes a follow-up turn (V2) #13490, fix(server): recover runless native child provider turns #14434, or [Bug]: Remote (SSH-launched) server dies on client disconnect, delegated subagents reported as cancelled #15608.If you catch a child while it's still stuck (before
task_cancel), this would show which case it is:A
toolorsubagentrow stillrunning/pendingafter the final assistant message points to the deferred-finalize pin. If every item is terminal and the provider turn is stillrunning, the settlement callback itself was dropped, which would be a different gap.Likely fix area
task_completedinstead of dropping it, so it's applied once the prompt settles.deferFinalizeForBackgroundWork,finishRegisteredBackgroundTool, andrearmDeferredFinalizein the Grok adapter.A maintainer will decide on the fix direction.
filipproch commentedon Oct 5, 2026
Same bug here on Linux. Two of my Grok children were still stuck when I read the triage, so here is the query you asked for, plus a census of which end signals T3 loses.
Setup: T3 Code desktop
0.0.45-main.8bc40b4e0, Grok CLI1.0.46(stable), children ongrok-4.7-build-fastwith reasoningxhighand full access, started bydelegate_task(async) from a Claude parent.The triage query on two stuck children
Both children had sent their final answer about 20 minutes earlier. For both, Grok's own session log has
turn_completedwithstop_reason: "end_turn"andturn_endedwithoutcome: "completed".There are no subagent rows. Every open row is a
command_executionfor a Grok background shell (rawOutput.type: "BackgroundTaskStarted"). So this is the deferred-finalize hold, in the background-tool branch ofhasDeferredBackgroundWork. In child A, all seven commands had exited 0, and Grok senttask_completedfor each one before the turn ended. T3 even wrote the final output text into those rows, but their status stayedrunning.Which end signals T3 honors
I matched every Grok background command in my runs since 2026-09-30 (81 commands) against how Grok reported its end in its session
updates.jsonl, and checked whether T3 closed the row.TaskOutputpoll (Result) on a UUID task idrawOutput.type: "KillTask", titlekill <id> (killed))TaskOutput.MultiResult)call-*task idtask_completedonly, with no poll or killSo the only path that works today is a single-task poll on a UUID id. I see four gaps at
8bc40b4e0. The two gates are unchanged on current main.finishRegisteredBackgroundToolreturns early while!context.promptSettled. In the stuck runs,task_completedarrived beforeturn_completed, so this is the first branch of your analysis.extractXAiKilledBackgroundTasksrequires a title that containskill_command_or_subagentorvariant === "kill". Grok 1.0.46 sendsKillTaskand titles the finished callkill <id> (killed).call-<uuid>-<n>ids.TaskOutput.MultiResult. The v1 helperXAiBackgroundTasks.tshandled it, but now only its own test imports it.Rates
These are runs since 2026-09-30 that stayed open more than 10 minutes after their final assistant message.
Of the Grok runs, 35 started no background command, and none of them got stuck. Of the 21 runs that started at least one, 16 stayed open until someone cancelled them.
On the fix direction
Fixing the four parsers would cover the shapes Grok sends today. The run would still hang the next time a shape changes, because nothing bounds the hold. The v1 Grok adapter had a liveness watchdog (10 minutes, or 30 with an active tool), and v2 has none. So Stop and a server restart are the only ways out.
I'd rather background commands never held the run.
turn_completedwould end the run, and commands still running would stay as pending work.backgroundWorkHoldsCompletioninorchestrationV2PendingBackgroundWork.tsalready treats commands that way for completion alerts, because a dev server can run for hours. Since #14488, Grok's reply to a finished background command opens its own run, so I don't think the hold buys much for commands. Subagents and monitors could keep the hold, with a timeout like the 60 s and 25 s ones that already exist.fix(server): carry upstream Grok fixes for stuck background commands …
al0x99 commentedon Oct 10, 2026
Same bug on macOS with Grok CLI 1.0.50 and T3 Code 0.0.46-nightly.20261009.2861. Two delegated Grok children stayed
runningfor about 16 hours after their final answer, untiltask_cancel.Every row left open was a Grok background shell. Grok had reported the end of each one, in shapes main does not apply:
task_completedabout 17 minutes before the rootturn_completed, so the!promptSettledgate dropped them;kill_command_or_subagent, which returnedrawOutput.type: "KillTask"with the titlekill <id> (killed).After the root turn, Grok ran two
task-completed-*wake turns. Their frames stayed buffered behind the held run.Wire method on 1.0.50. Grok's own
updates.jsonlstorestask_backgroundedandtask_completedassessionUpdatevalues on_x.ai/session/update. On the wire they are separate notifications. I drovegrok agent --always-approve stdio(1.0.50) from a minimal ACP client withsleep 8in the background, and recorded_x.ai/task_backgroundedand_x.ai/task_completedas their own methods, withturn_completedon_x.ai/session_notification. The_x.ai/session/updateshape looks like how Grok persists its log, not what it sends to T3.Replay of our trace. I turned the trace into a replay fixture with the wire methods above and neutral commands and outputs. It is not in a PR; I can send it if useful.
c77a7b7ee)running.grok_background_bash,grok_background_bash_fast_wakeandgrok_monitorwithno_finish_armed.The missing wake reply is a separate problem, the one #17144 lists under "Left out". Once any task was handled in the turn, the adapter drops every later agent chunk as chatter, including Grok's reply in a wake turn for a different task. I opened #17793 for that alone. It keys the chatter rule on the task named in the
task-completed-<id>prompt id, and includes a fixture recorded live from Grok 1.0.50.Neither #17144 nor #17504 puts a time limit on the hold.
letrandat commentedon Oct 13, 2026
Still happening on T3 Code
0.0.46-nightly.20261012.3021with Grok CLI1.0.52(macOS, Darwin 25.6.0). A delegated Grok child (grok-4.7, full access, asyncdelegate_taskfrom a Claude parent) stayedrunningfor 9h32m after its final answer. The parent was never woken. It only got out because T3 restarted.One detail may help narrow the fix. Three background shells ran in the same turn, and each one's
task_completedarrived before the rootturn_completed. Two closed normally and one stuck. The stuck one is the shell that Grok backgrounded on its own after the 30 s foreground limit, wheretask_idequals the tool call id. The two that closed were started as background tasks and have UUID task ids.From Grok's own
updates.jsonl(UTC):On the T3 side:
session/promptwent fromstartedtofailed(errorTag: Interrupt) at 16:19:55.625, the same instant as the finalassistant_message.command_executionrow forcall-…-23stayedrunning. A separatedynamic_toolrow titled[bg] … (call-f4f)did complete. The run and the thread stayedrunning.session/close, marked run 1cancelled(and the stuck command row with it), then started run 2 with "T3 Code restarted and resumed this turn". Grok replied in 15 s, run 2completed, and the parent woke.So on this build a restart works around it (run 1 still ends as
cancelledeven though it finished). #17144, #17504 and #17793 are still open, and none of them puts a time limit on the hold. A bounded fallback would cap the damage from the next variant: once the rootturn_completed/end_turnhas arrived, finalize after N minutes even if background rows are still open. This is the most common way our Grok lanes fail in multi-model runs.fix(server): carry upstream Grok fixes for stuck background commands …
paralyses2193 commentedon Oct 14, 2026
A deterministic repro on today's nightly. It takes about a minute and needs no long-running work.
Setup. T3 Code
0.0.46-nightly.20261014.3118(Linux desktop), Grok CLI1.0.52stable, a Claude parent thread,delegate_taskasync togrok/grok-4.7(reasoning low, full access).Repro (stuck every time). Delegate this task:
The background command ends while the prompt is still open, and nothing ever reads it.
task_backgroundedtask01a13cb8-934e-…, the T3 row[bg] sleep 10; …goesrunningbg-done.txtwritten (command exited 0)task_completedfor01a13cb8-934e-…,exit_code: 0turn_completedend_turntask-completed-*wake turn, finished at 23:22:29status: running,workState: working, row stillrunning, parent never woken. Ended withtask_cancel.Control (completes). Same task, but with only the background
sleep 45and an immediate reply. Thattask_completedarrives after the prompt settles, and the run completes 3 s later. The only difference is whether the end arrives before or after settlement.Unit test that hangs on main (
5a4e998053). InAcpAdapterV2.test.ts, a flavor withdeferFinalizeForBackgroundWork: trueandextractBackgroundTaskIdregisterstool-call-bg-1astask-bg-1. The test gatesprompt, appliesapplyBackgroundTaskMutationwithrunningand thencompletedwhile the prompt is open, and then resolves the prompt withend_turn. It never seesturn.terminaland times out after 120 s. Happy to put this up as a test-only PR if that helps.The one-line fix is not enough. If I drop
!context.promptSettledfromfinishRegisteredBackgroundTool, that test passes. But six existing tests fail, the ones that expect one post-finalize continuation for a mid-turn completion that was never handled in-turn (for example "mid-turn unhandled background completion still offers exactly one continuation after finalize"). So the focused fix probably needs to close the row (or ignore it inhasDeferredBackgroundWork) while keeping themidTurnUnreportedCompletedTaskIdsmark that drives the continuation offer. That trade-off seemed better left to you.Field data from the same machine. On 2026-10-13, two delegated Grok reviews stayed
runningafter their final answer. Every row left open was a[bg]command:multi-wait (wait_all)(variant: "TaskOutput", results underMultiResult.results[], bothstatus: completed). The run stayedrunningfrom the final answer at 12:23:25 untiltask_cancelat 13:39:51.variant: "KillTask", titledkill call-bd2 (killed), task idcall-bd283fbf-…-24(the tool-call id, not a UUID). It stayedrunningfrom the final answer at 15:17:04 untiltask_cancelat 16:47:48.Both match the shapes listed above, on Grok CLI
1.0.52.3xcalibur-tech commentedon Oct 15, 2026
Fresh reproduction on Grok Build 1.0.60, preserving the background-command case from #17504 as requested in the closure comment.
Environment and latest-version check
Checked on 2026-10-15: macOS 27.0.1 arm64, Node 24.21.0, Grok
1.0.60 (01a8e1c591c0) [alpha], modelgrok-4.7-build-fast. The CLI's own update check returned:{"currentVersion":"1.0.60","latestVersion":"1.0.60","updateAvailable":false,"installer":"internal","channel":"alpha","autoUpdate":null,"error":null}The live reproduction used unmodified
main42da166, drivingmakeGrokAdapterV2and its real ACP runtime withgrok agent --always-approve stdioin a fresh temporary directory. Main advanced to98bc998e73ad823cc15df6f110fedec10261a5bcduring verification; the ACP/Grok adapters and orchestration files are unchanged between those commits.Reproduce
In a full-access Grok thread, send:
The foreground command keeps the root prompt open while the background command finishes. In my live run the model followed those steps and did not poll the background task.
Observed on unpatched main
These are timestamps from the ACP wire capture and adapter events (UTC, 2026-10-15):
The live observation window was 10 seconds after the root prompt settled; it is not a claim that I waited hours. Both Grok turns had ended by the final observation. A deterministic regression test of this ordering also times out on main for both successful and failed commands.
Focused fix and before/after evidence
Retain structured command completion until root prompt settlement, then close the registered tool before checking deferred background work. Keep the authoritative completed/failed status despite
BackgroundTaskStartednormalization. Preserve the existing unreported-result continuation; receiving a lifecycle event does not mean the agent consumed its result. Monitor report handling stays on its existing path.The same live prompt with the focused patch produced:
This live harness stopped after observing root completion and the continuation offer; it did not execute that continuation. The four existing Grok orchestrator replays (
grok_background_bash,grok_background_bash_fast_wake,grok_monitor,grok_background_subagent) pass with the patch, as do all 120 ACP adapter tests.For the historical 1.0.50 investigation, the original live ACP evidence and the original orchestrator run remain on #17504. Those were runs of the old patched branch, not fresh proof against current main. The unpatched-main evidence above establishes the current failure independently. This narrows the replacement to the early command-completion branch of this issue; it does not claim to fix every subagent, TaskOutput, or KillTask case discussed here.
Investigated and implemented with GPT-6 Astra (high reasoning effort), T3 Code / Codex harness.
wookiist commentedon Oct 19, 2026
Still reproduces on Grok CLI 1.0.62 with T3 Code 0.0.46-nightly.20261019.3348 (macOS 27.0, arm64). Two of four
delegate_task(async, full-access) children togrok-4.7stayedrunningafter their final answer untiltask_cancel; the two that only read files completed normally. A few details that I don't think are in the thread yet:call-…task ids, matching @letrandat's observation. One child waited on the shell withget_command_or_subagent_outputand still got stuck, so theresultTaskIdFromGetOutputToolpath (gated onXAI_UUID_REinxaiAcpExtension.ts) does not close it either.KillTaskshape. The other child killed an already-finishednpm install. The frame came back asrawInput.variant: "KillTask",rawOutput.type: "KillTask",outcome: "already_exited", final titlekill <id> (already_exited).extractXAiKilledBackgroundTasksmatches on thekill_command_or_subagenttitle or akillvariant, so this shape is not recognized. @al0x99 saw(killed);already_exitedis another variant to cover.grok agent --always-approve stdiowith a minimal ACP client outside T3, five scenarios (read-only,echo, a >30 s command that auto-backgrounds, kill of a backgrounded command, kill of an already-exited task) all returnedend_turn, emitted_x.ai/task_completed, and the process exited 0 on stdin close. Grok'sunified.jsonlalso loggedshell.handle_prompt.done ok:truefor both stuck children.task_canceldoes not close the Grok session. After cancel the runs flipped tointerrupted, but the twogrok agentprocesses stayed alive and their logs show noshell.cancel.processing. Only the children that reachedcompletedwere closed by the idlesession_close~30 min later.Repro that should hit it every time (not run inside T3 by me, derived from the DB rows): delegate to a Grok child "run
sleep 40 && echo done; when it is auto-backgrounded, wait on it withget_command_or_subagent_output, then reply and end your turn."#19938 addresses the pre-settlement
task_completeddrop, which is the path both of my children took. I haven't checked whether it also covers thecall-…id andalready_exitedshapes above.NotPellew commentedon Oct 19, 2026
Additional reproduction on 2026-10-19, using T3 Code desktop nightly
0.1.1-nightly.20261018.3302, commitd0918f1659f4c19172796c8d1910ca6e4bc18b51(Linux).Setup and reproduction
A parent thread delegates an implementation task through T3's
delegate_task, withmode: "async",isolation: "worktree", provider instancegrok, and selected modelgrok-build.Two hangs were observed in one session:
runninguntil a follow-up message was steered into the thread. It then posted the report and the run terminated.status: running/workState: working, and the parent's completion notification never fired.This is an observed reproduction, not a deterministic minimal repro.
Concrete timeline and independently checked Grok completion evidence
All timestamps below are UTC on 2026-10-19.
git status,git rev-parse, andgit diff --stattool calls.sessionUpdate: turn_completed, withstop_reason: end_turn, after the final assistant message update.turn_ended, withoutcome: completed. This is the last event in that log.run_interrupt_request("Interrupt requested") andrun_interrupt_result("Run interrupted by user"). The task ends asinterrupted, despite the completed work and final report.The T3 timeline and task-status observations above were verified by the parent orchestrator. The Grok session files were inspected read-only for this comment; no raw logs or task contents are attached. The persisted Grok updates establish that Grok recorded completion, but do not prove that the completion notification reached T3 over the ACP transport.
Expected behavior and impact
The delegated subagent run should become
completedand notify its parent when the Grok turn finishes, without requiring a manual interrupt or follow-up message.In the same session, comparable delegated runs using
opencode,antigravity,codex, andclaudeAgentreached terminal states on their own.Workaround and limits
A manual interrupt after the final report releases the stuck task but records it as
interrupted. Steering a follow-up message released the first occurrence.No live repro was started for this report. I have not established which T3 projection rows, background-work hold, or completion-handling path caused these particular hangs. The Grok CLI version was not verified.
EgerDev commentedon Oct 20, 2026
Still reproduces on T3 Code
0.1.1-nightly.20261017.3272(commit13aa882c22d5) with Grok CLI 1.0.62, macOS 27 (Darwin 27.0.0, Apple M4, arm64).Setup: a
claudeAgent/claude-opus-5-5parent callsdelegate_task(mode: "async") togrok/grok-4.6, withreasoningEffort: "xhigh"and full access.Result: 5 of 7 Grok children stayed
running/workingwithsummary: nullafter their final answer. The parent was never notified.task_cancelturned them intointerrupted.In the same parent thread, children on Devin ACP (14+ tasks), Codex and Claude always settled.
Each stuck child matches the deferred-finalize hold from the triage here. Grok logged
turn_completed/end_turnat the same second as the finalassistant_message. Yet the run, the provider turn and one or morecommand_executionrows stayedrunning, and nocheckpointitem was ever written. The four Grok children that completed had no open background-shell rows.turn_completed(UTC)runningupdates.jsonl)task_id=call-…:task_completedexit 0 at 07:03:06; (b) UUID task stopped byKillTaskat 07:04:48task_id=call-…:task_completedexit 0 at 06:33:54, 80 min before turn end. Two UUID background tasks in the same turn closed fine.task_completedexit 0 at 07:19:09 and 07:19:16; one also hit byKillTaskat 07:21:04 after it had exitedcall-…ids)runningtointerruptedattask_cancelcall-…id)The triage query on one stuck child (E06) shows
command_execution|running|2, with nosubagentrows. The completed sibling (E05) has no running rows and hascheckpoint|completed|1.Notes:
20261020.3386, was published at 01:46 UTC), so I couldn't test it.call-…task id shape that @letrandat and @wookiist describe. E06(b) and E02 areKillTask.task_statuslooks exactly the same for a child that is still working and for one that finished an hour ago. Thentask_cancelthrows the finished result away asinterrupted. A time limit on the hold once rootend_turnhas arrived would turn all of these shapes into a short delay instead of a permanent hang. So would a visible "held by background work"workState.3xcalibur-tech commentedon Oct 20, 2026
Fresh live verification on October 20, 2026, 13:23–13:26 UTC: I could not reproduce the stuck-running failure in five targeted scenarios on a build containing #19938. There is a separate result-delivery problem described below, so this is not an unconditional “everything is fixed.”
Environment:
0.1.1-nightly.20261020.3411, embedded commitd36b7da2485bc889b320a285deea181f637d760a.1.0.62 (1474f9cbdd91) [stable].delegate_taskcalls through the running desktop server:mode: "async",isolation: "shared",grok/grok-4.7, reasoninglow, full access.e294a38a106acca87933d36789a4e0bd28a6e72ais an ancestor of its build commit, and that the shipped server bundle contains the retained command-completion implementation. These were tests of the installed server, not the source checkout.The recent reports above used builds from before #19938 merged at 2026-10-20 04:56:35 UTC. They establish the earlier failure but do not establish a regression after that fix.
Scenarios actually exercised, one fresh Grok child each:
sleep 5; echo T3_15888_EARLY_BG_DONE, then foregroundsleep 15; echo T3_15888_FOREGROUND_DONE, without polling or killing the background command. Its completion arrived before root settlement. Command, provider turn and run all completed.exit 7. The command correctly became failed, retained its output, and the provider turn/run completed.sleep 40; echo T3_15888_AUTO_BG_DONEwithblock_until_ms=30000, thenget_command_or_subagent_outputon the returned id. Verified actual auto-backgrounding withtask_id == tool_call_id == call-…and aTaskOutput.Resultfor that id. The original command row and run completed.sleep 45; echo T3_15888_KILL_TARGET_DONE, then nativekill_command_or_subagenton that task. VerifiedrawInput.variant: "KillTask",rawOutput.type: "KillTask", outcomekilled. The command row and run completed.sleep 5; echo T3_15888_EXITED_BG_DONE, foregroundsleep 12; echo T3_15888_WAIT_DONE, then native kill of the finished task. Verified thealready_exitedoutcome. The command row and run completed.Grok's persisted native lifecycle timestamps and read-only T3 projections agree. Two examples, UTC:
All five tasks returned
status: "completed"/workState: "result_available". All root and continuation runs were terminal, with zero pending/running timeline items at the final check. Automatic completion notifications reached the parent for all five, before I read their terminaltask_status. No Stop,task_cancel, follow-up steering or server restart was needed.Separate remaining problem: four of the five parent notifications and published task summaries said “Child task completed without an assistant result.” Every root run nevertheless has its requested final assistant reply in the T3 transcript. For those four tasks, the persisted
subagent_resulttransfer points to run 2, an empty continuation, rather than the root run containing the reply. In the early-success case, a laterlatestTerminalSummarycontains the expected reply while the publishedsummarystays the placeholder. The early-failure case delivered the expected reply normally. This looks like a continuation/result-selection issue; it is distinct from a child remainingrunningforever or the parent never being notified.Conclusion: #19938's early command-completion fix works in this live setup, including the observed
call-…and kill scenarios; the original hang did not reproduce. Result forwarding still needs attention. This was a small targeted sample, not a long-running stress test. Grok emitted atask_completedlifecycle notification in every case, including the killed task, so these passes do not prove that TaskOutput/KillTask-only fallback parsing works when that notification is absent. MultiResult, nested native subagents, Claude-parent and worktree-isolated variants were not tested.fix(server): carry upstream Grok fixes for stuck background commands …