VS Code Codex extension receives Cloudflare challenge HTML (403) instead of JSON, causing authentication failure and unstable state
Open 💬 7 comments Opened Mar 31, 2026 by junetech
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the IDE extension are you using?
openai.chatgpt-26.325.31654 (VS Code Codex extension)
What subscription do you have?
ChatGPT Business
Which IDE are you using?
VS Code (Remote SSH environment with .vscode-server)
What platform is your computer?
Windows x64 (host) + Linux (remote via VS Code server)
What issue are you seeing?
The Codex extension fails to properly authenticate backend/plugin endpoints and enters an unstable state.
Observed behavior:
- Repeated 403 Forbidden responses from backend endpoints
- Response body contains Cloudflare challenge HTML:
"Enable JavaScript and cookies to continue"
- Extension logs show:
chatgpt authentication required to sync remote pluginsfailed to warm featured plugin ids cache- After repeated failures:
outbound queue is fullServer overloaded; retry later.- Streaming responses frequently stall or disconnect
- Extension becomes slow and unreliable over time
This strongly suggests the extension is receiving HTML challenge responses instead of expected JSON API responses.
What steps can reproduce the bug?
- Use VS Code with Codex extension in a Remote SSH environment (.vscode-server)
- (Optional but likely relevant) Use overlay networking such as Tailscale or ZeroTier
- Ensure ChatGPT web login and codex-cli login are both active
- Start using the Codex extension (prompt, plugin usage, etc.)
- After initial usage, backend requests begin failing with 403 and Cloudflare challenge
- Extension gradually degrades into queue overflow and unstable state
What is the expected behavior?
- Backend/plugin endpoints should return valid JSON responses
- Extension should authenticate successfully using existing session
- No Cloudflare challenge HTML should be returned to the extension
- Extension should remain stable without queue overflow or streaming interruptions
Additional information
- ChatGPT web login is active and works normally
- codex-cli login is also active and functional
- Issue persists after:
- Reinstalling extension
- Deleting ~/.codex
- Using clean VS Code profile (--user-data-dir)
- Logs indicate that the extension cannot handle Cloudflare challenge responses and treats them as API failures
This appears to be a structural issue where non-browser clients (extension/app-server) cannot pass Cloudflare challenge, leading to authentication failure and cascading errors.
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for pointing out the potential duplicates. I reviewed both issues:
While they seem related at a high level (extension instability / auth issues), my case appears to be different in root cause.
In my case, the backend requests are explicitly returning Cloudflare challenge HTML (e.g., "Enable JavaScript and cookies to continue") instead of JSON. This leads to:
403 Forbiddenresponses on plugin/backend endpointschatgpt authentication required to sync remote pluginsoutbound queue is full,Server overloaded)This suggests the extension is failing due to receiving HTML challenge responses (likely Cloudflare) that it cannot handle, rather than just a generic auth/session issue.
I did not see Cloudflare challenge / HTML response behavior mentioned in those issues, so this may be a distinct failure mode.
I disabled Tailscale from Windows startup and rebooted, but the issue still reproduces with identical logs.
So this does not appear to be caused solely by Tailscale / overlay networking. The extension still receives a Cloudflare challenge response on the plugin sync endpoints (
/backend-api/plugins/list,/featured), resulting in 403 errors during startup.Also confirmed this happens even when opening a local repository (no Remote SSH).
Let me know if there are additional diagnostics I can provide.
From this stack trace, this could be a openai side auth issue. A quick npx ai-doctor run might help. It can fix auth handling by validating api keys and provider auth flow.
I ran
npx ai-doctor --ci, but it only detected Gemini (generativelanguage.googleapis.com) and did not appear to inspect Codex / ChatGPT extension auth flows at all.My Codex issue is still the same: the extension startup/plugin sync requests to
chatgpt.com/backend-api/plugins/...are getting403 Forbiddenwith Cloudflare challenge HTML instead of normal API responses.So I do not think
ai-doctoris relevant for this specific failure mode.I’m having the exact same issue using codex cli(codex-cli 0.118.0).
Following backend requests fail with Cloudflare challenge
403 Forbidden/Enable JavaScript and cookies to continue/backend-api/plugins/featured/backend-api/plugins/list/backend-api/connectors/directory/listIt also happens across multiple machines and networks, including a fresh aws linux instance.
Same here, cannot use from VS Code in a devcontainer.