Repository navigation
Continue a thread on another account when it hits a usage limit #18949
Replies: 8 comments
|
A data point for this proposal. I've used a local patch of roughly piece 2 every day for a few days, across four Claude accounts. It only sends existing commands: Some things that weren't obvious and that a built-in version will need to handle:
Happy to share more detail if it helps whoever picks this up. |
|
We rotate long-lived orchestrator threads between three Claude accounts when usage limits are reached. On 0.1.5, switching in the selector while the thread is idle worked in our tests and preserved model and options. The main obstacle to automating this is the race between checking that a thread is idle and switching it: another thread's message can start a run in between, and a switch during a run ends that run with "The provider event stream closed unexpectedly". PR #22755 proposes rejecting switches during active turns; #24294 requested an We also observed a stuck "Waiting on t3_thread_configure" item in the composer after a run interrupted that way, until Stop was pressed. #15993 reports a similar waiting-banner symptom, though we have not established a shared cause. An atomic switch that applies only when no run is active or queued would make continuation on another account after a usage limit automatable from inside a thread. The cost of the first turn after a switch, when the agent follows the recovery hint inside the handoff block, is reported separately in #27072. |
|
Adding a data point from running roughly piece 2 from outside T3, and a vote for the direction. Setup. One headless Linux server, four seats: two Claude accounts and two Codex accounts. Since 2026-10-27 a 5-minute timer has watched for threads stopped by a usage limit and moved them through T3's MCP tools. Order: the other account on the same provider first, then the other provider with a fixed model map. It skips accounts a thread was moved away from in the last 24 hours, stops after 3 moves per thread per day, and sends the resume with a client request id keyed on the limited run, so a retry can't send it twice. What happened. On 2026-10-27 it moved a polling thread off a Claude seat that hit its weekly limit, and the next runs finished on the other seat. On 2026-10-29 it moved 7 threads between the two Claude accounts in one day. Why I think it belongs in core, not in scripts like mine:
On the questions:
Ranking new threads by remaining quota is a separate problem (#6923), and I'm not asking for it here. Maintainers, would you approve piece 2's direction and scope as written above? If it helps, I can run @corneliu10's Written with Claude Opus 5.5 via T3 Code. |
|
One detail I'd want: only continue on another account when the chat gets a new message or was already working when the limit hit, so idle chats aren't moved. |
|
A case the failover should cover: delegated children. When an agent uses Details, transcript excerpts and a suggested fix are in #31057. So for piece 2, I'd include delegated children in the chain (or let a child follow its parent's account when the parent moves), and tell the parent agent when a child was moved or has a resume armed. Children are often the threads that hit the limit first, since they do most of the work. |
|
A data point for piece 1, across orgs, now also inside T3. T3 0.1.9, Claude Code 2.1.323, macOS. Three seats in three different orgs (two personal Ultra, one Team). Each seat has its own
So on this CLI version the cross-org question resolves in favor of native resume. The CLI drops the earlier thinking instead of failing. Gotchas for anyone wrapping the binary until piece 1 lands:
Written with Claude Opus 5.5 via Claude Code. |
|
+1 for Piece 2 (automatic usage-limit failover across accounts) β adding a multi-account Antigravity / Gemini use case alongside Claude/Codex. I run 3 separate Antigravity (Google) subscriptions as separate
Two details that would make Piece 2 work cleanly for Antigravity too:
|
|
A data point on moving idle threads between accounts by hand, since several people here script it with On 25 Nov we moved every thread of one Codex account to a second Codex account on the same server. That was 1,049 threads, archived ones included, in about two minutes through the MCP tool Three things that bit us:
In our fork this is now one server method plus a Settings β Providers action, "Move threads toβ¦". It is limited to accounts of the same driver, reports busy threads, and swaps back with the same call reversed. It is commit f72b130 on Posted by Claude (Opus 5.5, Claude Code via T3 Code) on behalf of @AdEx-Partners-DE. |
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