Repository navigation
Continue a thread on another account when it hits a usage limit #18949
corneliu10
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.
The problem
Many of us run T3 Code with more than one subscription seat. Provider instances already let us add several Claude or Codex accounts and pick one per thread, and the new orchestrator lets us switch account mid-thread. But when a long run stops on a usage limit, the thread has two options: wait for the reset ("Resume at reset" / "Snooze until reset") or switch by hand. If you're asleep or away, the work just stops, even though another account has quota left.
This came up before in #5863 (seven Claude Max accounts; pick the account with headroom) and #2111 (link several accounts and auto-switch). Both were closed in the maintenance sweep. The manual-switch part of #2111 is solved now; switching automatically is not.
What I'd like to propose
Two pieces. The first stands on its own.
1. A Claude shadow home, like Codex's
shadowHomePathToday two Claude instances with different
CLAUDE_CONFIG_DIRs get different continuation keys (claude:home:<dir>). So switching between them is alwayscreate_with_handoff: a transcript capped at 16k tokens, with no native tool or reasoning state.Codex already solves this with
shadowHomePath: each account keeps its ownauth.json, the session dirs are symlinked to one shared home, and the continuation key is the shared home. The same design works for Claude:shadowHomePathon a Claude instance.homePathstays the shared home, and the shadow becomes this account'sCLAUDE_CONFIG_DIR. The keychain item is named from that dir, so each login stays separate automatically.projects,file-history,tasks,todos,plans,session-env,shell-snapshots,paste-cache,agents,commands,skills,plugins, plushistory.jsonl,settings.jsonandCLAUDE.md. Everything else stays private, including.claude.json,.credentials.json,sessions/, policy and remote settings, and anything a future CLI version adds.restart_and_resumepath. That's a native--resumewith the full transcript.projects/. The link stayed intact and the transcript continued. I only had two seats of the same org; I didn't test across orgs. If the API ever refuses, the existing resume-failure fallback hands off.2. Automatic failover on a usage limit
usageLimitFailover: { enabled, chain: [{ instanceId, model? }] }, edited in Settings next to auto-resume.UsageLimitRecoveryWorkeron the same 5-second scheduler. It looks for threads whose latest run failed withusage_limitin the last 24 hours, and walks the chain top-down. It skips the failed account, accounts already tried since the thread's last completed run, disabled or unavailable accounts, and accounts whose cachedusageLimitsshow an exhausted window. Then it sendsmessage.dispatchwith the newmodelSelection,usageLimitContinuationOfRunIdand aproviderFailovermarker.usage_limit, the target isn't the failed account or an already-tried one, the thread is live, and no request is pending.limitRecoveryand snooze in the same commit.restart_and_resumeorcreate_with_handoff).ThreadLaunchService, a new thread whose selected account is in the chain and known to be exhausted starts on the first chain account with quota.providerFailover, and web and mobile show one quiet line on it: "Usage limit on Claude (work). Continued on Claude (personal)." Mobile follows the server setting but has no editor.Scope I'd keep out
Questions for maintainers
shadowHomePath) as a focused config-option PR, given that it mirrors the existing Codex capability?Both pieces are implemented with tests in my fork:
feat/claude-shadow-home(piece 1 only) andfeat/usage-limit-failover(both, stacked). Happy to split, shrink or rework them to fit.All reactions