Skip to content

Comments

fix: retry resume during pause persistence#3291

Draft
jayy-77 wants to merge 2 commits intosimstudioai:mainfrom
jayy-77:fix/pause-resume-race-3081
Draft

fix: retry resume during pause persistence#3291
jayy-77 wants to merge 2 commits intosimstudioai:mainfrom
jayy-77:fix/pause-resume-race-3081

Conversation

@jayy-77
Copy link

@jayy-77 jayy-77 commented Feb 21, 2026

Summary

  • Add a bounded retry around enqueueOrStartResume to handle the short window where the pause record is not yet visible/ready.
  • Retry only for transient conditions (missing paused execution, snapshot-not-ready) and fail fast for all other errors.

Test plan

  • cd apps/sim && bun run test -- lib/workflows/executor/human-in-the-loop-manager.test.ts

Fixes #3081

@vercel
Copy link

vercel bot commented Feb 21, 2026

@jayy-77 is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

Extract retry helper and use typed pause/resume errors so transient resume lookups can be retried without relying on error-message parsing. Add edge-case coverage for max-attempt exhaustion and mixed transient failures.

Fixes simstudioai#3081
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Race Condition: Resume request fails with "Paused execution not found" during pause persistence

1 participant