Repository navigation
Closed
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
- From a parent thread, call
delegate_taskwithisolation: "worktree"andmode: "async"to start a child thread (runordinal: 1). - While the child is running, stop/interrupt it from the UI in the child pane and immediately send a new message/steer in the child pane so the child starts a new run (
ordinal: 3) in the same worktree. - Observe the parent thread.
- Later, cancel/stop the child thread again from the UI.
Expected behavior
- If the child thread already has a newer queued or active run (
activeRunId/ newerordinal), the parent should NOT receive an unadorned terminal[interrupted]wake that makes the child appear finished, or the wake should clearly state that a newer run is active on that child thread. - Terminal wakes for earlier superseded runs should not be delivered out of order after a newer run has already cancelled or terminated.
Actual behavior
- After
ordinal: 1was interrupted whileordinal: 3was already starting/running in the child pane, the parent thread was woken with a terminal[interrupted]: ... Stopped by usermessage containing no indication that the child thread was actively runningordinal: 3. - Because the wake looked terminal, the parent began running commands and editing files in the child's worktree concurrently with the live child run
ordinal: 3, causing two agents to race on the same checkout and virtual display. - When the user later cancelled the child, the parent received a
[cancelled]wake forordinal: 4(completedAt: 00:23:50.558Z) and then afterwards received a stale[interrupted]wake for the earlier runordinal: 3(completedAt: 00:25:04.592Z).
Impact
Major degradation or frequent failure
Version or commit
T3 Code (Nightly) 0.1.12-nightly.20261122.5071 (0.1.12-nightly.20261122.5071)
Environment
macOS Darwin 27.3.0 (Apple Silicon), T3 Code (Nightly).app 0.1.12-nightly.20261122.5071 (0.1.12-nightly.20261122.5071), parent provider acpRegistry_devin (gemini-4-neon-high), delegated child provider acpRegistry_devin (swe-2-high, isolation: "worktree", mode: "async").
Logs or stack traces
{
"parentThreadId": "c98b1d80-cd05-4aba-b284-e227554a1fc7",
"childThreadId": "thread:delegated-task:command%3Amcp%3Ab53f9345-fbd8-4092-8cea-9c1880e977e3%3Adelegate-task%3Amali-batch6-finish-01",
"recentRuns": [
{ "ordinal": 4, "status": "cancelled", "requestedAt": "2026-11-23T00:21:31.447Z", "startedAt": null, "completedAt": "2026-11-23T00:23:50.558Z" },
{ "ordinal": 3, "status": "interrupted", "requestedAt": "2026-11-23T00:19:09.380Z", "startedAt": "2026-11-23T00:19:22.701Z", "completedAt": "2026-11-23T00:25:04.592Z" },
{ "ordinal": 2, "status": "cancelled", "requestedAt": "2026-11-23T00:16:51.737Z", "startedAt": null, "completedAt": "2026-11-23T00:16:53.182Z" },
{ "ordinal": 1, "status": "interrupted", "requestedAt": "2026-11-22T22:08:07.868Z", "startedAt": "2026-11-22T22:08:15.976Z", "completedAt": "2026-11-23T00:19:15.607Z" }
]
}Workaround
Call t3_thread_read on the child thread after any [interrupted] or [cancelled] wake to verify activeRunId === null before touching the child's worktree.
Metadata
Metadata
Assignees
Labels
No labels
Activity