Repository navigation
Add configurable low-quota threshold actions (pause / desktop alert) #5649
Description
Activity
- addedenhancementNew feature or requestNew feature or requestaccount-poolOAuth, credentials, Codex pool, quota, failover, plansOAuth, credentials, Codex pool, quota, failover, plans
on Sep 23, 2026 This is a valid policy gap, not the same setting as proactive account switching. The current threshold can prefer another eligible account, but it does not create a durable manual pause for the single-account case. A safe implementation should keep the reserve threshold separate from switching, make the pause transition idempotent per account/window crossing, never auto-resume a user-reserved account at reset unless explicitly configured, and emit notification data without credential/account-secret fields. The no-eligible-account response must be explicit rather than silently borrowing the protected account. I am keeping this open as an enhancement; the remaining maintainer decision is whether v1 should ship pause-only first or pause plus desktop notification in one change.
- addedpriority: P3Low: new provider/client integration, large or experimental feature (>2000 LOC or >50 files), RFC/roLow: new provider/client integration, large or experimental feature (>2000 LOC or >50 files), RFC/ro
on Sep 24, 2026 devin-ai-integration commented
on Sep 24, 2026 ContributorMore actionsTriage:
priority: P3— low-quota threshold actions.Criteria (P3): Low: new provider/client integration, large or experimental feature (>2000 LOC or >50 files), RFC/roadmap, or long-stale branch.
Matched pull requests:
- feat(codex): add quota-aware switching and resumable pool waits #3738 (related / partial) — feat(codex): add quota-aware switching and resumable pool waits [
priority: P3]
- feat(codex): add quota-aware switching and resumable pool waits #3738 (related / partial) — feat(codex): add quota-aware switching and resumable pool waits [
- added 2 commits that reference this issue
on Sep 26, 2026 Release train 4 (account-pool lane) is keeping this open. What shipped this train is a manual pause for generic OAuth accounts (#6106). It does not add a low-quota threshold action, an alert with account or reset context, or a settled resume. #5956 is the candidate for this and is on hold for the reasons in its review thread. Whatever lands here should keep the reserve threshold separate from proactive switching, make the pause idempotent per account and window, and never loosen the 98% main-account hard lock.
Reacted by PaulStatus update after checking dev at 0818ea1: the low-quota pool policy has landed through #6182 (f991131), superseding the earlier #5956 candidate. It supports threshold/window actions and a persisted pause with manual-resume behavior. The implementation and regressions are in
src/codex/low-quota-protection.tsandtests/codex-integration/low-quota-protection.test.ts.Keeping this issue open for its remaining desktop/system notification acceptance. The current
notifypath reaches local logs and authenticated event history; the documented default islogged, not OS delivery. This is a partial implementation update, not a claim that the entire request or native notification behavior is complete.
Area
Authentication and account pool / Dashboard / Platform notifications
What are you trying to accomplish?
I want OpenCodex to protect a Codex account before it is completely exhausted.
For example, if either the 5-hour or weekly quota reaches 80% used (20% remaining), I want OpenCodex to be able to automatically pause that account and/or alert me, instead of continuing to use it until the quota reaches 100%.
This is useful when I deliberately want to preserve the final part of my quota for later.
What prevents this today?
OpenCodex already has a configurable Usage threshold for proactive account switching, but that threshold is not a hard quota cutoff.
At the moment:
This is especially noticeable with only one account in the pool: crossing the proactive-switch threshold does not protect the remaining quota because there is nowhere else to switch.
What should OpenCodex do?
Please add a configurable action for crossing a quota threshold.
Example behavior:
Low quota threshold: 80% used
Actions:
The action should trigger when any selected quota window reaches or exceeds the configured used percentage. At minimum this should support the 5-hour and weekly Codex windows.
For automatic pause, the account should stop being eligible for new requests once the threshold is crossed, just as if I manually pressed Pause. Ideally it should remain paused until I manually resume it, so OpenCodex does not unexpectedly consume the reserved quota.
A notification should identify:
It would also be useful if this threshold/action were independent of the existing proactive-switch threshold, since switching and reserving quota are different policies.
Example usage or interface
In Codex Set → Advanced settings, something like:
Example result:
If another eligible account exists, normal routing can continue through that account. If none exists, requests should not silently continue through the protected/paused account.
Alternatives or workarounds
The current workaround is to watch the quota bars manually and press Pause before usage reaches the desired reserve level.
The existing proactive-switch threshold helps when another eligible account exists, but it does not provide a hard stop for a single account and is not the same as reserving quota.
Additional context
Tested against OpenCodex v2.63.0.
Relevant existing pieces already appear to exist in the codebase:
This request is specifically for a quota-crossing threshold action, not quota-reset notification.
Checks