Skip to content

[Feature]: Claude account pool — per-account pause and per-account auto-switch threshold (parity with Codex) #6013

Description

@thisisjun786

Summary

The Claude (Anthropic) account pool is missing two per-account controls that the Codex (ChatGPT) account pool already has. Please add them to the Claude pool so both pools can be managed the same way.

Current state (checked in v2.67.0)

Codex pool has:

  • Per-account pause: pausedCodexAccountIds (src/codex/account-pause.ts, isCodexAccountPaused). A paused account is excluded from future pool selection, but its credentials and runtime health stay as they are. It is exposed in the GUI, in the auth API (src/codex/auth-api/routes.ts) and in the CLI (ocx account pause).
  • Per-account auto-switch threshold override: codexAccountAutoSwitchThresholds (src/codex/account-auto-switch.ts). An account with no override inherits the global autoSwitchThreshold.

Claude pool has:

  • Only the pool-wide anthropicAccountPool.autoSwitchThreshold (default 80), plus enable/strategy/stickyLimit/quotaWindow.
  • No way to pause a single Claude account without logging it out or removing it.
  • No per-account threshold. Every Claude account switches at the same usage percentage.

Requested

  1. Pause/resume per Claude account
    • A paused account is skipped by Anthropic pool selection (quota / round-robin / fill-first, failover successors) and keeps its credentials.
    • Available from the GUI account card, the management API and the CLI, as it is for Codex.
    • Suggested storage: pausedAnthropicAccountIds, mirroring pausedCodexAccountIds. When an account is removed, its pause entry is removed too.
  2. Per-account auto-switch threshold for Claude accounts
    • An optional override for each account (0-100). An account with no override inherits anthropicAccountPool.autoSwitchThreshold.
    • All Anthropic usage-driven routing decisions use the effective per-account threshold (anthropic-routing.ts: the usage-score checks, fill-first advance and successor skipping).
    • Editable on the Claude account card, like the Codex one.

Why

With several Claude subscriptions of different sizes (for example Max 20x and Pro), one global threshold is too coarse. Some accounts should be drained further, and some should be kept in reserve at a lower percentage. Pausing is also needed to take an account out of rotation temporarily (to save it for direct use or during an investigation) without losing its login. Codex already supports both, so this would bring the Claude pool to parity with the Codex pool (following #294).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    account-poolOAuth, credentials, Codex pool, quota, failover, plansenhancementNew feature or requestpriority: P2Medium: provider/client-specific bug with a workaround, bounded enhancement tied to a tracked issue,

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions