Repository navigation
feat: resume threads automatically after a usage limit resets - #35
Merged
Merged
Conversation
When Claude, Codex, or Grok stops a thread on a usage limit, the thread
records when the limit resets. A banner (web) or card (mobile) offers to
resume at that time; the server sends the configured message ("go on")
a minute after the reset, stopping a turn Claude still holds on the
limit first. A server setting schedules this for every limited thread,
retrying once, and can drop fast mode on the resumed turn.
- Cancel sticks: only a new stop is auto-scheduled, not a re-report. - A parked turn that carries on by itself clears its limit instead of being interrupted by the resume. - A turn parked on several windows waits for the last reset. - Fast mode off is saved on the thread, not just the resumed turn. - Reset times name the day when they are not today. - The minute tick reads only threads with a pending resume.
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.
When Claude, Codex, or Grok stops a thread with "usage limit reached", you have to be around when the limit resets to send the message again. Now the thread can pick up by itself.
How
usageLimiton the thread, migration 55). The Claude, Codex, and Grok adapters emit a newturn.usage-limitedruntime event. If a provider gives no reset time, the server uses its published usage windows.UsageLimitResumeReactorsends the resume message a minute after the reset, even with every client closed. First it stops a Claude turn still holding on the limit.go on.Verified
UsageLimitResumePolicy.test.tsis new: 8 tests that fail without the implementation.ThreadSettlementReactor.test.tsstorage-cleanup failures are unrelated: they also fail on main.