[Bug] Anthropic pool: one 429 leaves the active account rate limited with a fake weekly 100%, and background refresh skips it (2.100.7)
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 32/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- nodejs, typescript
- Lĩnh vực
- authentication, backend
Hướng nghiên cứu
The bug spans the Anthropic account pool and the quota cache: start where a 429 marks an account as rate limited and where cache rows such as provider-account-quota-cache.json are written, then check why the background refresh skips a rate-limited account. Confirm that a 429 without a usage read no longer stores weeklyPercent 100, and that the refresh re-reads the cooled-down account. Reproduction depends on timing and a live account, so a fix needs a mocked 429 test.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Client or integration
Codex App (the same local proxy also serves Codex CLI on this machine)
Area
Authentication and account pool
Summary
After a single upstream 429, the active Anthropic OAuth account stayed marked rate limited with a cached weeklyPercent: 100, although its real weekly usage was 0%. Claude requests on that machine kept failing until I manually ran ocx account refresh anthropic. The periodic quota refresh that ran in the meantime updated the other (exhausted) account but skipped the blocked one, so the stale row never corrected itself.
Expected: a 429 that is not backed by a usage read should not be stored as a 100% weekly observation, and the background refresh should re-read the cooled-down account so it recovers as soon as the usage endpoint shows headroom.
This looks close to #6989 (fixed in 2.84.0), but here the version is 2.100.7, the cooldown was not caused by a real quota exhaustion, and the background refresh did not include the affected account.
Reproduction
Observed once on a live setup; I could not trigger the initial 429 deterministically.
- Anthropic pool enabled with two OAuth accounts: account A (active, weekly 0%) and account B (weekly 100%, waiting for its reset).
- At 11:54:48 UTC a Claude request on A got a 429. The pool tried B, found no eligible replacement and returned 429.
- From then on
ocx account list anthropicshowed A asactive rate limited, andprovider-account-quota-cache.jsonheld for A:weeklyPercent: 100, but a model windowFableatpercent: 17in the same row,updatedAt11:55:29 UTC. - At 12:00:56 UTC the background refresh rewrote the cache: B's row got a new
updatedAt, A's row stayed at 11:55:29 withweeklyPercent: 100. - At about 12:02 UTC,
ocx account refresh anthropicread A at weekly 0% / Fable 0%, clearedrate limited, and acodex exec -m anthropic/claude-sonnet-5-5call succeeded right away.
Same period, other machine: the same Anthropic account is also logged in on a second OpenCodex install (macOS, 2.100.4, separate OAuth login). That install read A at weekly 0% at 12:02:45 UTC and kept working the whole time. It refreshed its own access token around 11:54:51 UTC, three seconds after the 429 on Windows. This may be a coincidence; I mention it in case a concurrent refresh on the account causes a short 429 upstream.
Version
2.100.7 (npm global install, bundled Bun runtime, managed background service)
Operating system
Windows 11 Pro, build 28000
Provider and model
anthropic / claude-sonnet-5-5 and claude-opus-5-5 (whole Claude pool)
Logs or error output
2026-11-21T11:54:48.395Z [anthropic-pool] 429 on pA; failing over to pB
2026-11-21T11:54:50.646Z [anthropic-pool] no eligible replacement; returning 429
Cache rows before the manual refresh (IDs replaced):
{
"anthropic\u0000A": {"weeklyPercent":100,"weeklyResetAt":1795370400187,"displayWindows":[{"label":"Fable","scope":"model","percent":17,"resetAt":1795370400187,"weeklyAllowancePercent":50}],"updatedAt":1795262129229},
"anthropic\u0000B": {"weeklyPercent":100,"weeklyResetAt":1795348799908,"displayWindows":[{"label":"Fable","scope":"model","percent":95,"resetAt":1795348799909,"weeklyAllowancePercent":50}],"updatedAt":1795262455968}
}
After ocx account refresh anthropic:
{"anthropic\u0000A": {"weeklyPercent":0,"weeklyResetAt":1795370400496,"displayWindows":[{"label":"Fable","scope":"model","percent":0,"resetAt":1795370400000,"weeklyAllowancePercent":50}],"updatedAt":1795262608541}}
Redacted configuration
{
"anthropicAccountPool": {
"enabled": true,
"strategy": "quota",
"stickyLimit": 1,
"autoSwitchThreshold": 80,
"quotaWindow": "max-utilization",
"nativeMessages": true
}
}
Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
- Ngôn ngữ chính
- TypeScript
- Star
- 16.9k
- Fork
- 1.3k
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 844
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lidge-jun/opencodex
-
[Provider] antigravity-acp catalog omits gemini-4-hydrogen and gemini-4-neon that agy acp offersCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởcatalog provider provider-compatibility
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
lidge-jun/opencodex#9037 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Polish Spanish documentation wording and product namesCó thể đã có người làm @federicorv25 đã nhận 7 ngày trước. Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug cli platform service
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug][Windows]: ocx stop impossible when WMI GetOwnerSid exceeds the 1 s per-call capCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug cli platform service
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
lidge-jun/opencodex#9026 · 4 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
catalog enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của lidge-jun/opencodex
Issue tương tự
-
Project submission: xmcp DocsĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
slavakurilyak/awesome-ai-agents#1005 ·
-
kind/bug triage/unresolved
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
Maintainer thường phản hồi trong vòng 1 ngày
-
effort:S P3 refactor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
nightscout/nocturne#3735 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
wpilibsuite/systemcore-blocks-interface#641 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Site] Active section detection should respect scroll-margin-topCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởarea/web reproduced type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
anomalyco/opencode#65384 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày