v6.11.4
One bug fix, and the three follow-on defects found while making it hold.
Fixed
An account with no weekly quota left was tried again on every prompt (#218). The request failed, the plugin rotated away, and it happened again on the next prompt — the account was never remembered as spent.
Two things caused it. The backend reports quota usage on every response, but that signal was only ever read for the TUI status line, so the rotation layer could rediscover exhaustion only by failing another request. And when a 429 did arrive, the weekly and 5-hour resets were collapsed to whichever came first — always the 5-hour one — so the block expired against the wrong window.
An account that reports 0% left now leaves rotation before the next prompt, not after another failed request, and stays out until the window that is actually spent rolls over.
A short rate limit could shorten a week-long block. A concurrent in-flight request landing an ordinary 429 with a 30-second retry-after overwrote a weekly block, reproducing the original bug through a second door. Rate-limit blocks are now monotonic — a later, shorter one never pulls an existing block forward.
An ordinary throttle ignored two of the three reset formats, falling back to a 60-second default and retrying before the reset the backend had actually given.
A second opencode process could erase a weekly block. Two processes sharing an accounts file are last-writer-wins for rate-limit state, which is fine for a 5-hour window and not for a block worth days. Saves now keep whichever block runs longer.
Upgrading
No action required. Quota state is rebuilt from response headers, so an account already spent is recognized on its next response rather than needing a failed request first.
codex-doctor --fix still clears blocks, as before.
Notes
A weekly-exhausted account now reports its real wait — days, not minutes — so codex-health and rotation diagnostics will show long waits where they previously showed short ones. That is the fix working, not a new problem.
Thanks to @Grelo4ka for reporting #218.
Full changelog: v6.11.3...v6.11.4