Repository navigation
Description
Client or integration
OpenCodex dashboard
Area
Authentication and account pool
Summary
When an interactive OAuth login attempt is interrupted, cancelled, or fails (e.g. user closes the browser auth window or an aborted attempt occurs), loginState.get(provider) retains { done: true, error: "OAuth authentication failed. Check the OpenCodex account status and retry." } in runtime memory.
Subsequently, getLoginStatus(provider) in src/oauth/index.ts continues returning error: st?.error on every poll to /api/oauth/status?provider=google-antigravity, even if a valid account is already persisted in auth.json and active (loggedIn: true). The dashboard UI displays a permanent red banner:
OAuth authentication failed. Check the OpenCodex account status and retry.
Calling POST /api/oauth/login/cancel does not clear this error once done: true, because cancelLoginFlow only aborts pending controllers and does not delete finalized error state. The false error state persists until the process is restarted.
Reproduction
- Have an existing, valid
google-antigravityaccount configured in OpenCodex. - Trigger an OAuth login flow via
POST /api/oauth/loginwithprovider: "google-antigravity", then let it time out, close the browser without completing, or trigger an authentication abort. - Observe
loginState.get("google-antigravity")transitions todone: truewith errorOAuth authentication failed.... - Inspect
GET /api/oauth/status?provider=google-antigravity:
{
"loggedIn": true,
"email": "u***r@gmail.com",
"source": "oauth",
"error": "OAuth authentication failed. Check the OpenCodex account status and retry.",
"done": true,
"activeAccountId": "262a52071b361e634800e5d9a5f988e6",
"accounts": [...]
}- Try clearing via
POST /api/oauth/login/cancelwith{"provider": "google-antigravity"}: returns{"ok": true, "cancelled": false}, buterrorremains present in status. - Requests to
/v1/chat/completionssucceed normally because credential routing uses the valid credential inauth.json, but the dashboard continuously reports an OAuth failure.
Version
2.83.0 (commit 33b321853aff76045617824793cc7cbc1d4084e7)
Operating system
Ubuntu 26.04 LTS (Linux x86_64)
Provider and model
google-antigravity
Logs or error output
# Response from GET /api/oauth/status?provider=google-antigravity
HTTP/1.1 200 OK
Content-Type: application/json
{
"loggedIn": true,
"email": "u***r@gmail.com",
"source": "oauth",
"error": "OAuth authentication failed. Check the OpenCodex account status and retry.",
"done": true,
"activeAccountId": "262a52071b361e634800e5d9a5f988e6",
"accounts": [
{
"id": "262a52071b361e634800e5d9a5f988e6",
"email": "u***r@gmail.com",
"active": true,
"expiresAt": 1792413768002,
"plan": null
}
]
}Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
github-actions commentedon Oct 19, 2026
Automated translation bookkeeping — detected language: English.
Ingwannu commentedon Oct 19, 2026
Reproduced the settled-failure dismissal gap on current dev and opened Draft #7379. The public OAuth cancel endpoint can explicitly dismiss only its selected settled failed flow; active credential bytes and successful results remain intact. Existing internal cancellation callers retain their live-controller ownership contract. Focused OAuth/manual/code plus Codex cancellation-ownership regression coverage is being checked alongside hosted CI. This is not yet merged or released, and no installed service was restarted.
lidge-jun commentedon Oct 19, 2026
Fixed on dev by #7397 (squash dbb908f) (carries #7379): a settled failed OAuth login flow can now be dismissed and no longer masks the active account in login status. It ships in the next release (2.90.0).