Forumics logo Forumics
Issue 01

Back to issue

All Codex known issues

CLAIM C109 Supported 2026-11-13

GitHub issue #39054 in openai/codex, opened 2026-08-17 by rmanalan, records a report that when an MCP server rejects a refresh with a spec-correct `400 invalid_grant`, Codex does not discard the refresh token, re-sends the identical token on every subsequent attempt indefinitely, and never falls back to a fresh authorization flow; that the app layer is simultaneously told the server is still authenticated, so no re-authenticate affordance appears; that the user sees the MCP server present but with zero tools; that the report was reproduced on Codex CLI 0.140.0, 0.144.0, 0.146.0, 0.147.0 and 0.148.0-alpha.20 on macOS 26.5.2 arm64; and that the report attributes the behavior to the credential being judged usable purely because a non-empty refresh-token string is present, with the rejected refresh token never recorded. No root cause beyond the reporter's stated attribution is asserted.

Verbatim Excerpts from Cited Records
“When an MCP server rejects a refresh with a **spec-correct `400 invalid_grant`**, Codex does not discard the refresh token. It re-sends the identical token on every subsequent attempt, indefinitely, and never falls back to a fresh authorization flow. The app layer is simultaneously told the server is still authenticated, so no re-authenticate affordance appears.”
— rmanalan · openai/codex (issue 39054 opening body, What issue are you seeing? section) · 2026-08-17T19:17:12Z ·GitHub Issue ↗
“The user sees the MCP server present but with zero tools, and nothing indicates that logging in again would fix it.”
— rmanalan · openai/codex (issue 39054 opening body, What issue are you seeing? section) · 2026-08-17T19:17:12Z ·GitHub Issue ↗
“The same `refresh_token` value each time. No `POST /register`, no `GET /authorize`.”
— rmanalan · openai/codex (issue 39054 opening body, Observed, server side section) · 2026-08-17T19:17:12Z ·GitHub Issue ↗
“`authStatus` still reports `oAuth`. There is no error field. Only `tools` is empty and `serverInfo` is null. That combination is why no re-auth prompt is offered — the app has nothing to trigger one from.”
— rmanalan · openai/codex (issue 39054 opening body, Observed, client side section) · 2026-08-17T19:17:12Z ·GitHub Issue ↗
Counter-record: Issue open as of the fetch; 22 comments were read. github-actions[bot] (2026-08-17) flagged potential duplicate #38198. jdcodes1 (2026-08-17) confirmed every stage of the loop on main and noted the classification machinery already exists. charle-z (2026-08-18) reproduced against current main and confirmed the remaining break is persistence of the rejected token. rmanalan (2026-08-18) corrected his own root-cause section: the claim that `invalid_grant` is never inspected was wrong, because refresh_transaction.rs does classify it; the remaining issue is that the rejected refresh token stays in durable storage. charle-z (2026-08-18) revalidated and confirmed the classification is correct and the remaining invariant break is persistence. charle-z (2026-09-06) posted a persistence fix in a fork. awhitford (2026-09-07) corroborated with a self-hosted MCP server packet trace. aadithyanr (2026-10-10) reported about 28.8k refresh requests rejected with `400 invalid_grant` in 7 days from a single Codex install. seichris (2026-10-15) revalidated two deterministic reproductions still failing before a local candidate repair. MainSequenceDev (2026-10-16), robertsfeir (2026-10-17), tballard34 (2026-10-20), alexdloia (2026-10-20), harsh-k617 (2026-10-22) and nim442 (2026-11-01) added further server-side and reproduction evidence, and Smidge (2026-11-11) added a Codex 0.167.0-alpha.3.2 case with 135 retried refresh tokens. No maintainer fix merged in the surveyed thread and no retraction of the report appear. The claim documents only the original report, not a verified current state. Falsification probe: If GitHub issue #39054 is deleted without archive, if the author edits the opening body so the quoted sentences no longer match verbatim, or if the author posts a retraction of the report, this claim drops to Withdrawn. Audit verification: Verified 100% continuous verbatim substring against official GitHub REST API by scripts/verify_claim_verbatim.py.

See also: Codex vs Cursor head-to-head comparison on 9bests