OAuth quota probe failures lack actionable diagnostics while account health remains healthy
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
Research direction
Read src/oauth/health.ts, src/providers/quota.ts, src/providers/quota/anthropic-account-quota.ts, and src/server/management/oauth-account-routes.ts to trace how probe failures become account response fields. Start by comparing the Antigravity and Anthropic failure paths, then use synthetic adapter failures to check which causes are known and exposed. Done means diagnostics distinguish known failure types safely while transient quota failures leave credential health unchanged.
Written by the indexing model from the issue text.
Description
Client or integration
Direct HTTP/API client
Area
Provider adapter
Summary
OAuth quota probe failures lack actionable diagnostics while account health remains healthy. The API can report an unavailable quota without identifying whether the failure calls for reauthentication, verification, retry, or another action. Credential health and quota availability should remain separate; transient quota failures must not automatically mark credentials invalid.
Reproduction
Observed on an existing OAuth account pool; the original failed Antigravity account has since been removed by its owner, so this is not claimed to be a deterministic fresh-account reproduction.
- Configure Antigravity and Anthropic OAuth accounts on an OpenCodex hub.
- Using an authorized management API client, issue GET requests to
/api/oauth/accounts?provider=google-antigravity"a=1and/api/oauth/accounts?provider=anthropic"a=1. - In the observed failure state, HTTP 200 responses contained
health.status=healthytogether withquotaUnavailable=true; Antigravity additionally returnedquotaFailure=account_unavailable, while Anthropic supplied no actionable reason. - Compare credential-health fields and quota-probe diagnostics. The response does not establish which recovery action is appropriate.
No refresh=1 was used; results may include cached measurements. No generation request or deliberate account failure was induced. Synthetic adapter failures are proposed for maintainer-side regression testing below.
Version
Live observation: 2.83.0, installed checkout 33b321853aff76045617824793cc7cbc1d4084e7. Current upstream source inspected at dd2bdd2fe3ff6fc2d75019c8b7dc201b835b4109; live reproduction on that commit has not been performed.
Operating system
Ubuntu 26.04 LTS, x86_64; OpenCodex deployed in Docker.
Provider and model
Google Antigravity and Anthropic OAuth. Per-account quota endpoints; no particular model or generation request is involved.
Logs or error output
Selected anonymized API diagnostics (not complete raw responses):
{
"antigravity": {
"paused": false,
"health": {"status": "healthy"},
"quotaMode": "probe",
"quotaUnavailable": true,
"quotaFailure": "account_unavailable"
},
"anthropic": {
"paused": false,
"health": {"status": "healthy"},
"quotaMode": "probe",
"quotaUnavailable": true
}
}
No actionable reauthentication reason was present in the captured Anthropic response. Missing fields are not interpreted as explicit false.
Screenshots and supporting files
No raw screenshots or account dumps are attached because they contain private account identifiers. Detailed anonymized observations, source references and validation scenarios follow.
Redacted configuration
Existing hub with OAuth-authenticated google-antigravity and anthropic providers, per-account quota mode probe. No configuration-specific root cause has been established. Credentials, hostnames and account identifiers are intentionally omitted.
Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Detailed investigation
Summary
The OAuth account API can return health.status: "healthy" together with an unavailable quota probe, without enough information to determine whether the account needs reauthentication, provider verification, a retry, or no credential action at all.
This is a request to preserve actionable quota-probe diagnostics, not to equate every quota failure with an unhealthy credential or to set needsReauth on network errors.
Environment and evidence boundaries
- Live observations: OpenCodex 2.83.0, installed checkout
33b321853aff76045617824793cc7cbc1d4084e7. - Providers: Google Antigravity and Anthropic OAuth.
- Repeated management API reads returned HTTP 200.
- Requests used
quota=1, withoutrefresh=1. These observations are not an atomic snapshot or proof that a fresh upstream probe ran for every request. - No inference here depends on the Android client's presentation. The contradictory/underspecified fields below were read directly from OCX.
- Current upstream source was inspected at
dd2bdd2fe3ff6fc2d75019c8b7dc201b835b4109; similar diagnostic-loss paths still exist there. Live reproduction on that commit has not been performed.
Observed API responses (anonymized diagnostic excerpts)
GET /api/oauth/accounts?provider=google-antigravity"a=1 included an account with:
{
"id": "account-A",
"paused": false,
"health": { "status": "healthy" },
"quotaMode": "probe",
"quotaUnavailable": true,
"quotaFailure": "account_unavailable"
}
GET /api/oauth/accounts?provider=anthropic"a=1 included:
{
"id": "account-B",
"paused": false,
"health": { "status": "healthy" },
"quotaMode": "probe",
"quotaUnavailable": true
}
These are selected diagnostic fields, not complete raw responses. For Anthropic, no actionable quotaFailure / reauthentication reason was returned in the captured response. Missing fields must not be interpreted as explicit false.
The operator reported both accounts as unusable, but the specific upstream causes (suspension vs expired credentials vs verification vs another failure) were not independently established. In particular, these responses do not prove that re-login would fix either account.
The operator subsequently removed account-A. Comparing exact IDs before/after confirmed that this was the account with quotaFailure: "account_unavailable"; the Antigravity pool changed from two accounts to one, and the remaining account returned quotaUnavailable: false. Anthropic remained unchanged. Deleting an account is not proposed as a reproduction step or remedy.
Relevant source
projectOAuthAccountHealthdefaults tohealthywhen no stored reauth/cooldown/warning state is known. That may be correct for credential/routing health, but it does not establish probe success.- Antigravity account quota handling: the general exception handler maps failures to
account_unavailable, making different exception causes indistinguishable to an API consumer. - Anthropic account quota handling: some failure paths return unavailable/publish(null), without a comparable actionable failure code in the account response.
- OAuth account response projection exposes health and quota availability separately.
Expected behavior / suggested direction
Keep credential/routing health separate from quota-probe status, but expose enough bounded, sanitized metadata for clients to explain the situation:
- Last probe outcome and timestamp/freshness, including whether the result is cached.
- Distinguishable reasons where known: unauthorized/expired credential, forbidden/provider verification, rate limit, transport failure, upstream failure, missing required account metadata, or unknown/unavailable.
- An optional safe recommended action where supported by evidence: retry later, verify with provider, reauthenticate, or inspect configuration.
- Do not mark every unavailable quota as
reauth_required. Only propagate credential rejection into reauth state when the underlying result establishes that. - Document that
health: healthymeans no known stored account-health problem, not a successful current quota probe.
Exact field names are only suggestions; maintaining the existing API shape while improving diagnostic codes/documentation would also help.
Validation scenarios
Provider adapters can be tested with synthetic failures; no real account deletion is necessary:
- expired/rejected credential vs timeout produce distinct safe diagnostics;
- verification-required is not mislabelled as a generic network error;
- transient quota failure does not falsely set reauth state;
- Anthropic exposes a reason when the adapter knows one;
- stale/cached quota and its latest probe failure remain distinguishable;
- diagnostic fields never contain tokens, cookies, email addresses, raw response bodies or authorization URLs.
Related, but not identical
- #1062 — broader Antigravity account/pool-health and quota UX.
- #2566 — exposing per-account Anthropic quota in the CLI.
- #3644 — Codex plan/quota missing after an otherwise healthy login.
This report is specifically about loss/ambiguity of per-account quota-probe diagnostics across providers. If already tracked under one of those, linking/closing as a duplicate is welcome.
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 1.3k
- Avg merge
- 7h 34m
- Merged PRs (30d)
- 667
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lidge-jun/opencodex
-
Transient OAuth login failure persists in getLoginStatus and masks active account in dashboardPossibly taken A pull request linked to this issue is open or already merged. Openaccount-pool bug gui
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
lidge-jun/opencodex#7378 · 2 comments ·
Maintainers usually reply within 1 day
-
account-pool enhancement needs-design proxy
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
lidge-jun/opencodex#6737 · 1 comment ·
Maintainers usually reply within 1 day
-
fix(google-antigravity): discoverAntigravityProject fails with missing_project when project is not auto-discovered, rejecting valid tokensPossibly taken @yobushka claimed this today. Openaccount-pool bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
lidge-jun/opencodex#7382 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] 2.88.0: opted-in pool account leaves rotation 5 min after its last credit read once its 5h window is full; requests fall to the hard-locked main accountPossibly taken A pull request linked to this issue is open or already merged. Openaccount-pool bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
lidge-jun/opencodex#7377 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug] OpenCodex 2.88.0: existing threads fail after model/provider switching when encrypted reasoning is rejected inside HTTP 200 SSEPossibly taken A pull request linked to this issue is open or already merged. Openbug proxy streaming tools
Difficulty 5/5 Over a week Newbie friendliness 35/100
lidge-jun/opencodex#7369 · 2 comments ·
Maintainers usually reply within 1 day
All issues in lidge-jun/opencodex
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
simkimsia/netlify-axi#19 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
subhranshudash13-dotcom/Contribo#74 ·
Maintainers usually reply within 1 day
-
enhancement frontend good first issue Stellar Wave trivial
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Godgift-care/sci-healthcare-frontend#166 · 1 comment ·
Maintainers usually reply within 1 day
-
backend good first issue security Stellar Wave trivial
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Godgift-care/sci-healthcare-backend#171 · 1 comment ·
Maintainers usually reply within 1 day