fix(core): preserve logical step across retries (#37316)

This commit is contained in:
Kit Langton
2026-07-16 10:54:51 -04:00
committed by GitHub
parent eec6cd5234
commit 4829308f2d
2 changed files with 33 additions and 11 deletions
+2 -3
View File
@@ -339,8 +339,7 @@ const layer = Layer.effect(
const error = toSessionError(llmFailure)
if (
SessionRunnerRetry.isRetryable(llmFailure) &&
!publisher.hasRetryEvidence() &&
(agentInfo.steps === undefined || currentStep < agentInfo.steps)
!publisher.hasRetryEvidence()
) {
return yield* new SessionRunnerRetry.RetryableFailure({
cause: llmFailure,
@@ -457,7 +456,7 @@ const layer = Layer.effect(
Effect.tapError((error) =>
error instanceof SessionRunnerRetry.RetryableFailure
? Effect.sync(() => {
currentStep = error.step + 1
currentStep = error.step
assistantMessageID = error.assistantMessageID
currentPromotion = undefined
})