fix(core): preserve logical step across retries (#37316)
This commit is contained in:
parent
eec6cd5234
commit
4829308f2d
2 changed files with 33 additions and 11 deletions
|
|
@ -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
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue