Repository navigation
Usage-limit recovery: resume with the original task, show Resume for limited subagents, fail over to another configured account #21024
BlackPhoenixSlo
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem
I run long Claude threads that delegate work to subagents, with Auto-resume limited threads turned on. When the session limit hits, three things go wrong.
1. The auto-resume prompt drops the task
When the limit resets,
UsageLimitRecoveryWorkersends a fixed message,text: "Continue where you left off."(apps/server/src/orchestration-v2/UsageLimitRecoveryWorker.ts). In practice the agent picks the work back up for about two turns and then loses the goal, because the cache is cold and the original brief is far back in a long context. After that it drifts or stops, and I have to restart the task by hand.Ask: make the resume message carry the thread's original task. For example, re-send the first user message of the thread, or of the run that was limited, with a short note:
A setting or template for the resume text would also work: one option for the current bare message, one for "original prompt + continue note", and one for custom text. If the user steered the thread after the first message, including the latest user message as well as the first one would cover that.
Related: #17854 (keep a small task brief across limit-triggered switches), #15128 (auto-fork with distilled context on quota cutoff), #17997 / #12825 (resume without injecting a bare "continue").
2. No Resume control when a subagent is the one that hit the limit
When a delegated subagent (child thread) hits the limit, the parent thread has no Resume / Resume-at-reset control once the limit resets. The work just sits there until I notice it and tell the parent by hand to restart the child.
Ask: when a subagent stops on a usage limit, the parent should show a resume control for it, or the subagent should be armed for auto-resume like a top-level thread, using the same resume text as in point 1.
Related open reports on the same path:
completedright after the limit stop #16815: a limited Claude thread is never armed when background-task wake runs finish ascompleted(fix proposed in fix(server): background wakes no longer block usage-limit auto-resume #20804)3. Fail over to another configured account
If I have a second Claude provider instance (another subscription), a limit on one account should be able to move the thread to the other one automatically instead of waiting hours for the reset. This could be opt-in, with an ordered fallback list per provider and a visible handoff marker in the timeline. On failover, the incoming account should also get the original task (point 1), not only "continue".
Related: #18949 (continue a thread on another account when it hits a usage limit), #15846 (automatic hand-off to a fallback provider), #16512 (fallback provider for scheduled tasks), and PR #17753 (auto/specific fallback on usage limits; closed in the PR cleanup, not on its merits).
Summary
Point 1 seems the smallest and has the biggest effect on unattended runs. I'm happy to test any of these.
All reactions