Repository navigation
OpenAI accounts with spendable credits are paused at 100% included weekly usage #6465
Description
Client or integration
Other (T3 Code through Codex app-server)
Area
Authentication and account pool
Summary
An OpenAI account can reach 100% included weekly usage while still having spendable purchased credits. OpenCodex 2.63.0 ignores WHAM credits, marks the account exhausted and pauses it. Requests can then fall back to another account with no credits and return the weekly-limit 429. Reset tickets are a separate resource and were zero in the affected case.
Reproduction
- Configure OpenAI Pool mode with a paid account and a second account with no included headroom or credits.
- Return this redacted/synthetic WHAM fixture for the paid account:
{"plan_type":"pro","rate_limit":{"allowed":true,"primary_window":{"used_percent":100,"limit_window_seconds":604800}},"credits":{"has_credits":true,"unlimited":false,"overage_limit_reached":false,"balance":"42.5"},"rate_limit_reset_credits":{"available_count":0}}- Refresh quotas, then call
PUT /api/codex-auth/accounts/pause-exhausted. - Observe the paid account being paused. A subsequent
/v1/responsesrequest may use the empty account and fail with 429. - Independently,
computeCodexUsageScorereports 100 and drops an existing account affinity despite spendable credit capacity.
Expected: retain fresh spendable credits separately from reset tickets, keep the account eligible, and continue to honor upstream refusals, overage flags, real request cooldowns, and explicit local admission policies.
Version
@bitkyc08/opencodex 2.63.0; the same window-only exhaustion/selection checks remain on dev e0af52c.
Operating system
macOS on Apple Silicon; Bun 1.4.0.
Provider and model
openai / gpt-6.1-sol
Logs or error output
Before any reset-ticket redemption, a request through the funded account completed with HTTP 200 while included usage was 100%; shortly afterwards, fallback to the empty account returned HTTP 429: The usage limit has been reached. Account details, request identifiers and credentials are intentionally omitted. The synthetic regression fixture above reproduces the local classification error.
Screenshots and supporting files
Regression coverage is being submitted in a linked PR. A local hotfix also updates a private operator quota-recovery script to consult the same policy helpers; that script is not part of this upstream repository.
Redacted configuration
{"codexAccountMode":"pool","autoSwitchThreshold":99}Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
github-actions commentedon Oct 2, 2026
Automated translation bookkeeping — detected language: English.
Ingwannu commentedon Oct 3, 2026
Tracked by draft #6466; it is not merged or released. There is also a newer local-policy change on current dev 4b74668: #6444 makes spending ChatGPT credits after a full usage window a per-account opt-in (creditCodexAccountIds), default off. The proposed fix needs to distinguish upstream spendable balance from that permission and test both switch states before integration. I requested that current-dev reconciliation in #6466. Your synthetic fixture is sufficient to investigate the parser/classifier without exposing account data or making billed requests; I have not executed the live historical case or claimed the draft fixes current production behavior.
fix(codex): require consent for spendable-credit headroom (carry lidg…