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

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Dara AdedejiandClaude Opus 5.5 authored and GitHub committed 2026-10-03 09:54:44 -05:00
1 parent a0bf1eee48
commit ce90eec1ff
4 files changed
+8 -6

No files matched your search

@@ -3673,7 +3673,7 @@ export function makeClaudeAdapterV2(
readonly output: ClaudeNativeToolOutput;
readonly status: Extract<
OrchestrationV2TurnItem["status"],
"running" | "completed" | "failed"
"running" | "completed" | "failed" | "interrupted" | "cancelled"
>;
readonly startedAt: DateTime.Utc;
readonly updatedAt: DateTime.Utc;
@@ -4740,7 +4740,9 @@ export function makeClaudeAdapterV2(
parentNodeId: toolCall.parentNodeId,
ordinal: toolCall.ordinal,
output: NO_CLAUDE_NATIVE_TOOL_OUTPUT,
status: "failed",
// A stopped turn cuts its open tools short; only a turn that
// ended on its own leaves them failed.
status: input.status === "completed" ? "failed" : input.status,
startedAt: toolCall.startedAt,
updatedAt: input.completedAt,
presentation: toolCall.presentation,
@@ -44,7 +44,7 @@ export function assertClaudeBackgroundTaskInterruptOutput(
projection.turnItems.flatMap((item) =>
item.type === "command_execution" ? [item.status] : [],
),
["completed", "failed"],
"the background launch completed; the interrupted foreground command did not",
["completed", "interrupted"],
"the background launch completed; the foreground command was interrupted",
);
}
@@ -81,7 +81,7 @@ export function assertTurnInterruptMidToolClaudeOutput(
assert.isDefined(commandItem);
assert.isDefined(interruptRequest);
assert.isDefined(interruptResult);
assert.equal(commandItem.status, "failed");
assert.equal(commandItem.status, "interrupted");
assert.include(commandItem.input, "node -e");
assert.equal(interruptRequest.status, "completed");
assert.equal(interruptResult.status, "interrupted");
@@ -111,7 +111,7 @@ export function assertTurnInterruptRestartClaudeOutput(
assert.equal(projection.providerThreads[0]?.status, "idle");
const commandItem = projection.turnItems.find((item) => item.type === "command_execution");
assert.isDefined(commandItem);
assert.equal(commandItem.status, "failed");
assert.equal(commandItem.status, "interrupted");
assert.include(commandItem.input, "node -e");
const outboundFrames = transcript.entries.flatMap((entry) =>