287 people reported
All time, since Sep 25, including 228 thumbs-up on GitHub.
Codex requests fail with 401 "Incorrect API key" (sk-svcac) despite ChatGPT sign-in
“[Windows][26.924.20706] ChatGPT-authenticated Codex fails with 401 and reports invalid sk-svcac API key”
Is this your bug? What gets counted gets fixed. Pile on.
Paste this into your agent. It files your report, with your error and version.
I hit this bug: rapsheet.dev/sheets/codex/themes/109/file Follow it to file my report. Show me the text before you send.
No install. No account. Public and anonymous. The link asks your agent for one report, nothing else. What it sends
2 bugs in this theme
- 401 invalid sk-svcac API keyNo workaround yet259 people
- Remote compaction 401 errorNo workaround yet46 people
What's included
- Every prompt in VS Code extension, Desktop app or CLI returns 401 Incorrect API key provided: sk-svcac…fvMA
- Automatic remote context compaction fails with "Error running remote compact task" 401
- Sign out/in, app reset, regenerated auth.json and older CLI builds still return the same 401
- Failure appears across all projects and new Work tasks while regular ChatGPT keeps working
- Reconnecting attempts repeat before the 401 appears; sometimes clears after reboot
Not included
- 401 errors caused by a user-configured OPENAI_API_KEY or API-key login mode
- Usage-limit or rate-limit errors
- Thread/rollout-state issues reported by codex doctor
Original reports59, newest first
- VS Code Codex intermittently returns 401 Incorrect API key while using ChatGPT Plus loginOn GitHub#48570
- [Windows 11] Codex Desktop 26.924.20706: 401 Incorrect API key across all projects with ChatGPT sign-inOn GitHub#48307
- Codex /responses returns 401 invalid_api_key with invariant sk-svcacct credential on a ChatGPT Plus accountOn GitHub#48306
- URGENT: Codex Completely Unusable After Today’s Update – 401 Unauthorized / Invalid sk-svcacct CredentialOn GitHub#48305
- [VS Code][Windows][Auth/Compaction] Remote compaction v2 returns 401 with sk-svcac credential; auth recovery not runOn GitHub#48304
- [Windows] Codex 0.157.0 returns 401 with sk-svcac credential; downgrading CLI to 0.148.0 also restores Desktop authOn GitHub#48302
- Codex CLI 0.157.0: ChatGPT login succeeds, but requests fail with 401 using stale sk-svcac credentialOn GitHub#48299
- [Windows] Codex Desktop/Work returns 401
Incorrect API key(sk-svcac...) while signed in with ChatGPTOn GitHub#48298 - ChatGPT Pro OAuth succeeds, but Codex sends
sk-svcac...credential and gets 401 — reproducible with clean CODEX_HOMEOn GitHub#48295 - ChatGPT OAuth succeeds but Codex inference returns 401 sk-svcac — reproduces with fresh CODEX_HOME across 0.153.4–0.157.0On GitHub#48293
Show all 59Show only the newest 10
- Codex CLI 0.157.0 uses unexpected sk-svcac credential and returns 401 despite valid ChatGPT OAuth loginOn GitHub#48292
- ChatGPT-authenticated Codex repeatedly reconnects and previously returned 401 with unexpected sk-svcac credentialOn GitHub#48291
- ChatGPT-authenticated Codex disconnects, falls back to HTTPS, then returns 401On GitHub#48289
- Codex CLI 0.157.0: ChatGPT OAuth succeeds but inference disconnects across Windows, macOS, and LinuxOn GitHub#48288
- [Windows] Codex Desktop/CLI returns 401 sk-svcac despite valid ChatGPT OAuth token; direct bearer request is acceptedOn GitHub#48286
- Codex macOS app stuck reconnecting and returns 401 Unauthorized / incorrect sk-svcac API keyOn GitHub#48285
- [Windows] Codex Desktop/CLI returns 401 'Incorrect API key provided' after successful ChatGPT loginOn GitHub#48283
- ChatGPT auth succeeds but Codex CLI sends invalid sk-svcac credential and /codex/responses returns 401On GitHub#48282
- [Windows] Codex CLI/Desktop keeps using revoked sk-svcac credential despite ChatGPT authOn GitHub#48281
- Windows Codex 401 with ChatGPT login: stale/incorrect sk-svcac API keyOn GitHub#48279
- 401 UnauthorizedOn GitHub#48278
- [Windows] ChatGPT-authenticated Codex sends/reports invalid sk-svcac API key and returns 401On GitHub#48276
- [Backend][ChatGPT OAuth] GPT-5.6 requests return 401 for internal sk-svcacct credential across Codex CLI and OpenCodeOn GitHub#48275
- 401 api errorOn GitHub#48274
- Codex Desktop on macOS returns 401 with stale sk-svcac credential on every new chatOn GitHub#48273
- Connecting, won't let me connect, an error appearsOn GitHub#48271
- [Windows] ChatGPT Plus OAuth returns 401 incorrect sk-svcac key after 5-hour usage resetOn GitHub#48270
- Codex CLI and Desktop Fail After Available Reset – WebSocket Disconnection and 401 Unauthorized (Windows)On GitHub#48267
- [macOS] Codex CLI 0.157.0 returns 401 "Incorrect API key provided" after successful ChatGPT OAuth login auth Issues related to authentication and accounts bug Something isn't working CLI Issues related to the Codex CLIOn GitHub#48266
- ChatGPT Plus OAuth suddenly returns 401 "Incorrect API key provided: sk-svcac..." on Codex backendOn GitHub#48265
- Windows ChatGPT auth returns 401 invalid_api_key after fresh OAuth login across 0.156.0–0.157.0On GitHub#48264
- Codex CLI 0.157.0 uses an invalid sk-svc API key despite ChatGPT authenticationOn GitHub#48263
- 401 with valid ChatGPT auth in CLI/Desktop; direct bearer-token request is acceptedOn GitHub#48262
- ChatGPT Work authentication errorsOn GitHub#48261
- [macOS] Codex CLI 0.157.0 returns 401 "Incorrect API key provided" after successful ChatGPT OAuth loginOn GitHub#48260
- Codex CLI 0.157.0 returns 401 "Incorrect API key" with ChatGPT auth despite valid ChatGPT tokensOn GitHub#48259
- Gives error saying wrong API key even though I'm not using an API keyOn GitHub#48258
- Unexpected status 401On GitHub#48257
- unexpected status 401 Unauthorized: Incorrect API key providedOn GitHub#48256
- ChatGPT macOS app Codex returns 401 Incorrect API key on backend-api/codex/responsesOn GitHub#48255
- Codex 401 "Incorrect API key" despite ChatGPT auth and no configured API key on WindowsOn GitHub#48253
- [Linux Desktop] ChatGPT login recreates OPENAI_API_KEY and requests fail 401 with incorrect API keyOn GitHub#48252
- ChatGPT OAuth login succeeds, but Codex inference fails with 401 "Incorrect API key provided"On GitHub#48251
- The error is in a loopOn GitHub#48249
- 972e7251cb54On GitHub#48248
- Codex 401 Unauthorized: Incorrect API errorOn GitHub#48247
- Codex api key errorOn GitHub#48246
- Mid answering lost connection - multiple stream disconnect then 401sOn GitHub#48245
- ERROR-unexpected status 401 Unauthorized: Incorrect API key provided: sk-svcacOn GitHub#48244
- Random 401 API key errors on CodexOn GitHub#48243
- 401 Unauthorized after automatic switch back to GPT-6 AstraOn GitHub#48242
- unexpected status 401 Unauthorized: Incorrect API key provided:On GitHub#48241
- Codex throwing an API errprOn GitHub#48240
- unexpected status 401 UnauthorizedOn GitHub#48239
- unexpected status 401 Unauthorized issueOn GitHub#48237
- 401 Unauthorized across Codex Desktop and CLI after working normally all dayOn GitHub#48235
- Total OutageOn GitHub#48234
- Remote compaction fails with 401 'Incorrect API key' (sk-svcacct) for ChatGPT-authenticated usersOn GitHub#48232
- Error unexpected status 401 Unauthorized when trying to resume a threadOn GitHub#48230