From 4e0df053fc44bcc13d7f31c6b80d9695832927ad Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 27 Oct 2026 20:28:12 +0000 Subject: [PATCH 1/4] docs(orchestration-v2): task_cancel describes queued-only tasks The task_cancel section said a nonterminal task with no interruptible run is rejected. cancelTask also accepts a task that is waiting on its delegates or has a queued turn of its own, and cancels that queued turn even when Stop already held it, while other queued turns stay held. Co-Authored-By: Claude Opus 5.5 --- docs/orchestration-v2/orchestrator-mcp-server.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/orchestration-v2/orchestrator-mcp-server.md b/docs/orchestration-v2/orchestrator-mcp-server.md index e41f42c8248a..7c32deae4f08 100644 --- a/docs/orchestration-v2/orchestrator-mcp-server.md +++ b/docs/orchestration-v2/orchestrator-mcp-server.md @@ -318,12 +318,16 @@ the published task result. ### `task_cancel` Stops the child thread with the internal `thread.stop` command, then stops every -task the child delegated, and disposes automatic parent delivery. Like a user Stop, -`thread.stop` interrupts the running turn, holds queued turns, and ends pull request -watches. A nonterminal task with no interruptible run is rejected. A terminal task -returns its existing status, and its child thread still stops, including later -runs and watch wakes. Published task results remain available. It accepts an -optional cancellation reason. +task the child delegated, cancels the task's own queued turn, and disposes +automatic parent delivery. Like a user Stop, `thread.stop` interrupts the running +turn, holds queued turns, and ends pull request watches. The task's own queued +turn is cancelled even if Stop already held it, so a task that is only queued can +be cancelled; other queued turns in the child stay held for Resume. A nonterminal +task with no active run, no running delegates, and no queued turn of its own is +rejected, unless it is a follow-up still running on the parent, which is +cancelled there. A terminal task returns its existing status, and its child +thread still stops, including later runs and watch wakes. Published task results +remain available. It accepts an optional cancellation reason. ### `create_threads` From c5b42a9d44b7071a09607da95fee08f4a40b1d48 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 27 Oct 2026 20:36:19 +0000 Subject: [PATCH 2/4] docs(orchestration-v2): task_cancel rejection and orphan rules match the code Co-Authored-By: Claude Opus 5.5 --- docs/orchestration-v2/orchestrator-mcp-server.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/orchestration-v2/orchestrator-mcp-server.md b/docs/orchestration-v2/orchestrator-mcp-server.md index 7c32deae4f08..bd7402c4aa29 100644 --- a/docs/orchestration-v2/orchestrator-mcp-server.md +++ b/docs/orchestration-v2/orchestrator-mcp-server.md @@ -323,11 +323,13 @@ automatic parent delivery. Like a user Stop, `thread.stop` interrupts the runnin turn, holds queued turns, and ends pull request watches. The task's own queued turn is cancelled even if Stop already held it, so a task that is only queued can be cancelled; other queued turns in the child stay held for Resume. A nonterminal -task with no active run, no running delegates, and no queued turn of its own is -rejected, unless it is a follow-up still running on the parent, which is -cancelled there. A terminal task returns its existing status, and its child -thread still stops, including later runs and watch wakes. Published task results -remain available. It accepts an optional cancellation reason. +task is rejected when it has no active run, no queued turn of its own, and +nothing it is still waiting on: a running delegate, a delegate result its parent +has not received, or a background task. A terminal task returns its existing +status, and its child thread still stops, including later runs and watch wakes. +Either way, a follow-up still running on the parent is cancelled there and +reported as `cancelled`. Published task results remain available. It accepts an +optional cancellation reason. ### `create_threads` From 32dd2c643220d17e88b0b25bf55a8232a385bbf2 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 27 Oct 2026 20:43:57 +0000 Subject: [PATCH 3/4] docs(orchestration-v2): task_cancel names orphaned follow-ups and buffered wakes Co-Authored-By: Claude Opus 5.5 --- .../orchestration-v2/orchestrator-mcp-server.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/orchestration-v2/orchestrator-mcp-server.md b/docs/orchestration-v2/orchestrator-mcp-server.md index bd7402c4aa29..454a235614cb 100644 --- a/docs/orchestration-v2/orchestrator-mcp-server.md +++ b/docs/orchestration-v2/orchestrator-mcp-server.md @@ -320,14 +320,15 @@ the published task result. Stops the child thread with the internal `thread.stop` command, then stops every task the child delegated, cancels the task's own queued turn, and disposes automatic parent delivery. Like a user Stop, `thread.stop` interrupts the running -turn, holds queued turns, and ends pull request watches. The task's own queued -turn is cancelled even if Stop already held it, so a task that is only queued can -be cancelled; other queued turns in the child stay held for Resume. A nonterminal -task is rejected when it has no active run, no queued turn of its own, and -nothing it is still waiting on: a running delegate, a delegate result its parent -has not received, or a background task. A terminal task returns its existing -status, and its child thread still stops, including later runs and watch wakes. -Either way, a follow-up still running on the parent is cancelled there and +turn, holds queued prompts, cancels buffered provider wakes, and ends pull request +watches. The task's own queued turn is cancelled even if Stop already held it, so +a task that is only queued can be cancelled; other queued prompts in the child +stay held for Resume. A nonterminal task is rejected when it has no active run, +no queued turn of its own, and nothing it is still waiting on: a running +delegate, a delegate result its parent has not received, or a background task. A +terminal task returns its existing status, and its child thread still stops, +including later runs and watch wakes. In both cases, a follow-up that lost its +child run but still shows as running on the parent is cancelled there and reported as `cancelled`. Published task results remain available. It accepts an optional cancellation reason. From dc8490c1bfea98cd5612656ce64dad2580c23b66 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 27 Oct 2026 21:03:35 +0000 Subject: [PATCH 4/4] docs(orchestration-v2): task_cancel says later queued prompts are held Co-Authored-By: Claude Opus 5.5 --- docs/orchestration-v2/orchestrator-mcp-server.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/orchestration-v2/orchestrator-mcp-server.md b/docs/orchestration-v2/orchestrator-mcp-server.md index 454a235614cb..9745380a8da0 100644 --- a/docs/orchestration-v2/orchestrator-mcp-server.md +++ b/docs/orchestration-v2/orchestrator-mcp-server.md @@ -326,8 +326,9 @@ a task that is only queued can be cancelled; other queued prompts in the child stay held for Resume. A nonterminal task is rejected when it has no active run, no queued turn of its own, and nothing it is still waiting on: a running delegate, a delegate result its parent has not received, or a background task. A -terminal task returns its existing status, and its child thread still stops, -including later runs and watch wakes. In both cases, a follow-up that lost its +terminal task returns its existing status, and its child thread still stops the +same way: a later running turn, including a watch wake, is interrupted, and later +queued prompts are held, not discarded. In both cases, a follow-up that lost its child run but still shows as running on the parent is cancelled there and reported as `cancelled`. Published task results remain available. It accepts an optional cancellation reason.