authorgravatar for 76637177+SunkenInTime@users.noreply.github.comDara Adedeji <76637177+SunkenInTime@users.noreply.github.com> 2026-10-03 10:54:44-04:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-03 09:54:44-05:00
logce90eec1ffc2087395227a610843091f4b260cf7
treeae249fcb8a710e80715615a0ba5e47d3280c68f4
parenta0bf1eee48d1537ec38e0f1fa5243f10ffd4e870
signature Signed by PGP key B5690EEEBB952194

fix(server): a Claude command you stop shows as interrupted (#14896)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

4 files changed, 8 insertions(+), 6 deletions(-)

apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts+4-2
......@@ -3673,7 +3673,7 @@ export function makeClaudeAdapterV2(
36733673 readonly output: ClaudeNativeToolOutput;
36743674 readonly status: Extract<
36753675 OrchestrationV2TurnItem["status"],
3676 "running" | "completed" | "failed"
3676 "running" | "completed" | "failed" | "interrupted" | "cancelled"
36773677 >;
36783678 readonly startedAt: DateTime.Utc;
36793679 readonly updatedAt: DateTime.Utc;
......@@ -4740,7 +4740,9 @@ export function makeClaudeAdapterV2(
47404740 parentNodeId: toolCall.parentNodeId,
47414741 ordinal: toolCall.ordinal,
47424742 output: NO_CLAUDE_NATIVE_TOOL_OUTPUT,
4743 status: "failed",
4743 // A stopped turn cuts its open tools short; only a turn that
4744 // ended on its own leaves them failed.
4745 status: input.status === "completed" ? "failed" : input.status,
47444746 startedAt: toolCall.startedAt,
47454747 updatedAt: input.completedAt,
47464748 presentation: toolCall.presentation,
apps/server/src/orchestration-v2/testkit/fixtures/claude_background_task_interrupt/output.ts+2-2
......@@ -44,7 +44,7 @@ export function assertClaudeBackgroundTaskInterruptOutput(
4444 projection.turnItems.flatMap((item) =>
4545 item.type === "command_execution" ? [item.status] : [],
4646 ),
47 ["completed", "failed"],
48 "the background launch completed; the interrupted foreground command did not",
47 ["completed", "interrupted"],
48 "the background launch completed; the foreground command was interrupted",
4949 );
5050}
apps/server/src/orchestration-v2/testkit/fixtures/turn_interrupt_mid_tool/claude_output.ts+1-1
......@@ -81,7 +81,7 @@ export function assertTurnInterruptMidToolClaudeOutput(
8181 assert.isDefined(commandItem);
8282 assert.isDefined(interruptRequest);
8383 assert.isDefined(interruptResult);
84 assert.equal(commandItem.status, "failed");
84 assert.equal(commandItem.status, "interrupted");
8585 assert.include(commandItem.input, "node -e");
8686 assert.equal(interruptRequest.status, "completed");
8787 assert.equal(interruptResult.status, "interrupted");
apps/server/src/orchestration-v2/testkit/fixtures/turn_interrupt_restart/claude_output.ts+1-1
......@@ -111,7 +111,7 @@ export function assertTurnInterruptRestartClaudeOutput(
111111 assert.equal(projection.providerThreads[0]?.status, "idle");
112112 const commandItem = projection.turnItems.find((item) => item.type === "command_execution");
113113 assert.isDefined(commandItem);
114 assert.equal(commandItem.status, "failed");
114 assert.equal(commandItem.status, "interrupted");
115115 assert.include(commandItem.input, "node -e");
116116
117117 const outboundFrames = transcript.entries.flatMap((entry) =>