v2.3.0-beta.0.md

June 4, 2026 · View on GitHub

Runtime Rotation

Features

  • Sequential / drain-first account scheduling (opt-in). A new schedulingStrategy setting (CODEX_AUTH_SCHEDULING_STRATEGY / schedulingStrategy, default hybrid) adds a sequential mode that drains one account fully before moving to the next, instead of spreading load across the pool. Set it to sequential to keep every new request on the current active account until that account is exhausted (rate-limited, cooling down, circuit-open, or disabled), then advance to the next usable account. When an earlier account's quota window recovers it reclaims the active slot on the next forward scan, so the pool's quota windows stagger over time rather than resetting together — longer uninterrupted sessions across a multi-account pool (issue #509).
  • Default behavior is unchanged. hybrid remains the default and keeps the existing weighted health/token/freshness selection plus per-session affinity. sequential is fully opt-in; pools that do not set it behave exactly as before.
  • Manual pin still wins. A switch <n> pin overrides scheduling in both modes. In sequential mode per-session affinity is intentionally bypassed — every request follows the single active account, not a per-chat sticky account.

Release Hygiene

Tests

  • Selector coverage for the drain-first path: sticky-while-usable, advance-on- exhaustion, wrap-to-recovered-earlier-account, returns-null when the whole pool is exhausted, cooldown/circuit-open/disabled failover, per-family cursor isolation, and the policy-blocked-anchor guard.
  • Proxy-level coverage: affinity is ignored, manual pin takes precedence, the active pointer advances only on true exhaustion (not on a transient attempted-this-request skip), and the mode survives the routing-mutex select+commit path without double- advancing the cursor.
  • Config coverage for schedulingStrategy: default, explicit value, env override in both directions, and invalid env/persisted values falling back safely.

Notes

  • Prerelease published under the beta dist-tag (npm i -g codex-multi-auth@beta). Whether drain-first delivers longer uninterrupted sessions depends on each pool's real quota-window timing, which is why this ships as a beta for validation on real accounts before a stable cut.