You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(rotation): make selection token-bucket-aware; stop persisting local limiter
Fixes a cross-process regression introduced in 6.4.0. The 6.4.0 fix for
sticky/hybrid stalling on local token-bucket depletion wrote a synthetic
window into account.rateLimitResetTimes — but that field is persisted to the
shared accounts file and reloaded by every process, so one process draining
its OWN in-memory proactive limiter could spuriously rate-limit a
server-healthy account in OTHER concurrent processes (the multi-process /
PID-offset mode this tool targets).
Root-cause fix:
- TokenBucketTracker gains hasToken() / msUntilToken().
- AccountRotation selection (sticky, hybrid, round-robin) and
getMinWaitTimeForFamily are now token-bucket-aware in-memory via a shared
isSelectable() helper: a locally-depleted account is skipped with NO
persisted state, and an all-depleted pool waits for refill (no spurious 503).
- The local-depletion branch in index.ts no longer calls recordRateLimit()
(which applied a server-429-style health penalty to a purely-local throttle)
and no longer writes a synthetic window. Removed the now-unused
LOCAL_TOKEN_DEPLETION_COOLDOWN_MS constant.
Also fixes codex-warm reporting a quota-exhausted account as "warmed": a 429
is now classified by reason (quota/usage_limit -> exhausted/failed; transient
tokens/concurrent -> opened/warmed).
Adds cross-process-leak regression tests + warm 429-reason tests.
Full suite: 2613 passed, 1 skipped. Bumps to 6.4.1.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .codex-plugin/plugin.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "oc-codex-multi-auth",
3
-
"version": "6.4.0",
3
+
"version": "6.4.1",
4
4
"description": "Install and operate oc-codex-multi-auth for OpenCode with ChatGPT Plus/Pro OAuth, Codex/GPT-5 routing, multi-account rotation, account switching, health checks, diagnostics, quota status, and recovery tools.",
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
+
## [6.4.1] - 2026-06-30
11
+
12
+
### Fixed
13
+
- Local token-bucket depletion no longer leaks into persisted, cross-process state. 6.4.0 made a depleted account rotate by writing a short synthetic window into `rateLimitResetTimes` — but that field is saved to the shared accounts file and reloaded by every process, so one process exhausting its own in-memory proactive limiter could spuriously mark a server-healthy account as rate-limited in OTHER concurrent processes (the multi-process/PID-offset deployment this tool targets). Account selection (`sticky`, `hybrid`, `round-robin`) and `getMinWaitTimeForFamily` are now token-bucket-aware directly: a locally-depleted account is skipped in-memory with no persisted state, and an all-depleted pool waits for token refill instead of returning a spurious 503. The local skip also no longer records a server-429-style health penalty, so a busy-but-healthy account is not deprioritized in `hybrid` scoring. (#183)
14
+
-`codex-warm` no longer reports a quota-exhausted account as "warmed". A `429` is now classified by reason: a `quota`/`usage_limit` 429 (the window is already spent) is surfaced as a distinct failure, while a transient `tokens`/`concurrent` 429 (window active) still counts as warmed. (#182)
0 commit comments