[Feat] Let tasks sleep and resume after a requested wait - #1301
Open
roomote-community[bot] wants to merge 12 commits into
Open
[Feat] Let tasks sleep and resume after a requested wait#1301roomote-community[bot] wants to merge 12 commits into
roomote-community[bot] wants to merge 12 commits into
Conversation
Contributor
Author
|
No code issues found. See task
Reviewed 0383961 |
Contributor
Author
|
Addressed the lifecycle risks identified in the follow-up review in Timed and manual resumes share one recoverable claim; failed children cannot consume a wait; unclaimed pending snapshots remain protected until resumed or cleared; failed setup restores Goal Mode generation state; durable waits suppress automatic goal continuation; and duplicate requests repair pending waits without treating consumed waits as success. Focused DB, API, BullMQ, and worker tests plus repository lint, type checks, and pre-push checks pass. |
daniel-lxs
marked this pull request as ready for review
August 14, 2026 23:37
daniel-lxs
requested review from
brunobergher,
daniel-lxs and
mrubens
as code owners
August 14, 2026 23:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
wait_taskaction for agent-requested pauses from 10 minutes through six days.Why this change was made
Tasks previously had no durable way to honor requests such as "check again in 30 minutes." Blocking sleeps retained compute, while ordinary idle sleep had no timed wake-up. The lifecycle also needs to remain correct under Redis failures, retries, manual messages, canceled resume attempts, retention sweeps, prolonged worker outages, and Goal Mode continuation.
Impact
Roomote agents can intentionally sleep without holding an active sandbox and automatically continue at the requested time. A wait cannot create competing manual and timed resumptions, and canceling a manual resume no longer prevents the scheduled wake from creating its timed continuation or allows retention to delete the required snapshot. Transient queue failures remain recoverable, pending waits keep their resume handle through outages, and preserved goals remain actionable after waking. Short waits that would be dominated by sleep and resume overhead are rejected, and unsupported runtimes fail before claiming that the task is paused.