Skip to content

[Bug]: openai-codex provider blocked by Cloudflare (403 CF mitigation active) on valid OAuth token #62087

Description

@st4rnin3

Summary

The openai-codex provider is currently failing with a 403 Forbidden due to Cloudflare mitigation on the ChatGPT backend endpoint, despite holding a freshly acquired and valid OAuth token.

This breaks the default free model paths (openai-codex/gpt-5.4, openai-codex/gpt-5.4-mini).

Reproduction

  1. Authenticate via openclaw models auth login \u2192 OpenAI Codex
  2. Successfully exchange the authorization code for a token
  3. Attempt to use the model (e.g. via cron job or standard conversation)
  4. Fails with timeout / 403.

Direct POST to https://chatgpt.com/backend-api/conversation using the saved Bearer token yields:

Response (403): <html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <style global>body{font-family:Arial,Helvetica,sans-serif}.container{align-items:center;display:flex;flex
...

Headers confirm: CF mitigation active on this endpoint. The token is valid, but ChatGPT endpoint requires JS/browser validation.

Impact

  • All jobs and agent turns bound to the openai-codex provider hang until they timeout, then fallback.
  • In environments without paid fallbacks, the system becomes non-functional.
  • Tokens are generating correctly via the app_EMoamEEZ73f0CkXaXp7hrann client, but the API endpoint itself is aggressively blocking headless HTTP clients.

Environment

  • OpenClaw 2026.4.5
  • Provider: openai-codex
  • Models: gpt-5.4, gpt-5.4-mini

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions