You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
workflow-runtime 0.0.3: sweep() never recovers a run whose worker died mid-step (fixed on main by #15, unreleased) #23
@tanstack/workflow-core 0.0.4, @tanstack/workflow-runtime 0.0.3 (latest on npm)
Describe the bug and the steps to reproduce it
If the process driving a run dies inside a step, the run stays running with an expired lease forever. In 0.0.3, runtime.sweep() only handles schedules and timers and never calls store.claimStaleRuns. Calling claimStaleRuns plus runWorkflow by hand doesn't help either, because core 0.0.4 has no recover mode, so replay stops at the last checkpoint.
#15 (merged 2026-07-21) fixes this: expired-run recovery in sweep(), recover: true in core, and lease heartbeats. I built main at b928717 and confirmed sweep() re-runs the interrupted step and finishes the run, and that the heartbeat stops a long step from being reclaimed mid-flight.
Request: could the release PR #16 be merged, so core 0.0.5 and runtime 0.0.4 ship to npm? That would let us pin a published version instead of a git SHA.
Do you intend to try to help solve this bug with your own PR?
No — the fix is already on main; this is a request to publish it.
Terms & Code of Conduct
I agree to follow this project's Code of Conduct
I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
This is published now in core 0.0.5 and runtime 0.0.4. Thanks for the clear reproduction! Please reopen this or file a fresh reproduction if recovery still gets stuck on these versions.
AI review notes:
Release PR #16 shipped the recovery fix from #15 and the timer fix from #25. The release workflow passed, all eight npm package downloads matched their published SHA-512 hashes, and their tags point to release commit 30511ad.
A smoke test using the published core and runtime packages reproduced the expired worker lease setup from this report. A sweep recovered the run, executed its step once, and finished it successfully. This checks the supplied expired-lease example, not a real process crash mid-step.
SQL store users should apply the bundled 0001_fair_timer_claims.sql migration when upgrading.
Activity
tannerlinsley commentedon Nov 12, 2026
This is published now in core 0.0.5 and runtime 0.0.4. Thanks for the clear reproduction! Please reopen this or file a fresh reproduction if recovery still gets stuck on these versions.