Skip to content

Commit a8811a0

Browse files
PR Batch Testerclaude
andcommitted
fix(claude): an accepted steer always marks its turn and commands
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 5623f36 commit a8811a0

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

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

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10712,17 +10712,25 @@ export const makeClaudeAdapterV2 = Effect.fn("makeClaudeAdapterV2")(function* (
1071210712
pdfReservation.commit();
1071310713
}),
1071410714
),
10715+
Effect.tap(() =>
10716+
Ref.update(steeredTurns, (current) => {
10717+
const next = new Set(current);
10718+
next.add(turnInput.providerTurnId);
10719+
return next;
10720+
}),
10721+
),
10722+
// Eligibility survives older abort results and overlapping steers.
10723+
Effect.tap(() =>
10724+
Effect.sync(() => {
10725+
for (const [toolUseId, state] of currentTurn.rootCommands) {
10726+
if (state === "foreground") {
10727+
currentTurn.rootCommands.set(toolUseId, "steered");
10728+
}
10729+
}
10730+
}),
10731+
),
1071510732
),
1071610733
);
10717-
yield* Ref.update(steeredTurns, (current) => {
10718-
const next = new Set(current);
10719-
next.add(turnInput.providerTurnId);
10720-
return next;
10721-
});
10722-
// Eligibility survives older abort results and overlapping steers.
10723-
for (const [toolUseId, state] of currentTurn.rootCommands) {
10724-
if (state === "foreground") currentTurn.rootCommands.set(toolUseId, "steered");
10725-
}
1072610734
return [...currentTurn.rootCommands.keys()];
1072710735
}),
1072810736
);

0 commit comments

Comments
 (0)