Skip to content

VS Code Codex extension receives Cloudflare challenge HTML (403) instead of JSON, causing authentication failure and unstable state #16341

Description

@junetech

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 plugins
    • failed to warm featured plugin ids cache
  • After repeated failures:
    • outbound queue is full
    • Server 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?

  1. Use VS Code with Codex extension in a Remote SSH environment (.vscode-server)
  2. (Optional but likely relevant) Use overlay networking such as Tailscale or ZeroTier
  3. Ensure ChatGPT web login and codex-cli login are both active
  4. Start using the Codex extension (prompt, plugin usage, etc.)
  5. After initial usage, backend requests begin failing with 403 and Cloudflare challenge
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    authIssues related to authentication and accountsbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions