Skip to content

Commit e7bdfab

Browse files
SunkenInTimeclaude
andcommitted
fix(server): only skip an empty turn the adapter would count as completed
An empty result with is_error false can still carry an abort or API failure in terminal_reason. Use terminalStatusFromResult alongside is_error so those keep settling the wake run. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent e128fcd commit e7bdfab

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7237,6 +7237,7 @@ export function makeClaudeAdapterV2(
72377237
lastResult?.type === "result" &&
72387238
lastResult.num_turns === 0 &&
72397239
!lastResult.is_error &&
7240+
terminalStatusFromResult(lastResult) === "completed" &&
72407241
drained.slice(lastResultIndex + 1).some((entry) => isClaudeTurnStartMessage(entry));
72417242
const opaqueReplayTombstones = taskIdSetForNativeThread(
72427243
yield* Ref.get(opaqueBackgroundTaskReplayTombstonesByNativeThread),

0 commit comments

Comments
 (0)