codex - 💡(How to fix) Fix macOS: Cloudflare 403 blocks all chatgpt.com/backend-api/codex/responses requests — CLI unusable while browser works on same network

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Likely the same root cause as #17860 (rustls TLS fingerprint
detected as non-browser traffic by Cloudflare).

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

0.121.0

What subscription do you have?

ChatGPT Pro (Personal org, active subscription)

Which model were you using?

gpt-5.4

What platform is your computer?

Darwin 25.2.0 x86_64 i386

What terminal emulator and version are you using (if applicable)?

macOS Terminal.app (default), no multiplexer

What issue are you seeing?

Codex CLI fails with 403 Forbidden on every request to https://chatgpt.com/backend-api/codex/responses

What steps can reproduce the bug?

  1. codex login (OAuth via ChatGPT, completes successfully)
  2. codex login status → "Logged in using ChatGPT"
  3. Run codex and send any prompt (e.g. "explain this codebase")
  4. Response: 403 Forbidden from chatgpt.com (cf-ray above)
    Reproduces 100% of the time on 0.121.0.

Same network, same account, same machine — browser access
to chatgpt.com/codex works fine.

What is the expected behavior?

CLI should reach the backend and return a normal response,
the same way the browser client does on the same account/network.

Additional information

Likely the same root cause as #17860 (rustls TLS fingerprint
detected as non-browser traffic by Cloudflare).

extent analysis

TL;DR

The issue is likely due to Cloudflare detecting the Codex CLI as non-browser traffic, resulting in a 403 Forbidden response, and a workaround or fix related to TLS fingerprinting may be necessary.

Guidance

  • Verify that the issue is indeed related to Cloudflare's detection of non-browser traffic by checking the cf-ray header in the response.
  • Investigate the possibility of modifying the Codex CLI to mimic browser-like TLS fingerprinting, as hinted at in the reference to #17860.
  • Check if there are any updates or patches available for the Codex CLI version 0.121.0 that may address this issue.
  • Consider using a different terminal emulator or configuration to see if the issue is specific to the default macOS Terminal.app.

Example

No code snippet is provided as the issue does not explicitly mention a code-related fix.

Notes

The issue may be specific to the combination of Codex CLI version, ChatGPT Pro subscription, and macOS Terminal.app. The reference to #17860 suggests that this issue may be related to a known problem with rustls TLS fingerprinting.

Recommendation

Apply workaround: Given the likely cause of the issue, applying a workaround related to TLS fingerprinting, such as modifying the Codex CLI to mimic browser-like behavior, may be the most effective solution until a fixed version is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix macOS: Cloudflare 403 blocks all chatgpt.com/backend-api/codex/responses requests — CLI unusable while browser works on same network