Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3646,7 +3646,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;
Expand Down Expand Up @@ -4710,7 +4710,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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
Expand Down
Loading