unexpected status 403 Forbidden
What version of Codex is running?
0.77
What subscription do you have?
PRO
Which model were you using?
5.2
What platform is your computer?
wsl ubunt 22
What issue are you seeing?
HI, perform a git pull on the branch master.
Response: unexpected status 403 Forbidden: <!DOCTYPE html><html lang="en-US"><head><title>Just a moment...</title><meta
http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="X-UA-Compatible"
content="IE=Edge"><meta name="robots" content="noindex,nofollow"><meta name="viewport" content="width=device-
width,initial-scale=1"><style>*{box-sizing:border-box;margin:0;padding:0}html{line-height:1.15;-webkit-text-size-
adjust:100%;color:#313131;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica
Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}
body{display:flex;flex-direction:column;height:100vh;min-height:100vh}.main-content{margin:8rem auto;padding-
left:1.5rem;max-width:60rem}@media (width <= 720px){.main-content{margin-top:4rem}}.h2{line-height:2.25rem;font-
size:1.5rem;font-weight:500}@media (width <= 720px){.h2{line-height:1.5rem;font-size:1.25rem}}#challenge-error-
text{background-image:url("data:image/
svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0ibm9uZSI+
PHBhdGggZmlsbD0iI0IyMEYwMyIgZD0iTTE2IDNhMTMgMTMgMCAxIDAgMTMgMTNBMTMuMDE1IDEzLjAxNSAwIDAgMCAxNiAzbTAgMjRhMTEgMTEgMCA
xIDEgMTEtMTEgMTEuMDEgMTEuMDEgMCAwIDEtMTEgMTEiLz48cGF0aCBmaWxsPSIjQjIwRjAzIiBkPSJNMTcuMDM4IDE4LjYxNUgxNC44N0wxNC41Nj
MgOS41aDIuNzgzem0tMS4wODQgMS40MjdxLjY2IDAgMS4wNTcuMzg4LjQwNy4zODkuNDA3Ljk5NCAwIC41OTYtLjQwNy45ODQtLjM5Ny4zOS0xLjA1N
y4zODktLjY1IDAtMS4wNTYtLjM4OS0uMzk4LS4zODktLjM5OC0uOTg0IDAtLjU5Ny4zOTgtLjk4NS40MDYtLjM5NyAxLjA1Ni0uMzk3Ii8+PC9zdmc+
");background-repeat:no-repeat;background-size:contain;padding-left:34px}@media (prefers-color-scheme: dark)
{body{background-color:#222;color:#d9d9d9}}</style><meta http-equiv="refresh" content="360"></head><body><div
class="main-wrapper" role="main"><div class="main-content"><noscript><div class="h2"><span id="challenge-error-
text">Enable JavaScript and cookies to continue</span></div></noscript></div></div><script>(function()
{window._cf_chl_opt = {cvId: '3',cZone: 'chatgpt.com',cType: 'managed',cRay: '9b30ba699a2c5e5b',cH:
'7UDDuGmbbtni7DIqqHdjFfS5XrmHgK9oxT35EmKR98g-1766585908-1.2.1.1-
whmq4TW0GKSP_ib568qWhBo6us37aDDTfNZR78006VG7pM_7xKFTmUM.vKfbwwLF',cUPMDTk:"\/backend-api\/codex\/responses?
oZOnap1MI7faVZD_s2y2W4gpLvjORmvHLeuXtIXk4dyKy.weWqET3PRD9oS5y07YFFF4AFpd4jnByTIKpyjeF11MqSLXOaQ7BmHFOEXi5VLfRKPPDwI
5oJsZwlE1foOrHQAwSLu.71FlHqndyYhnLHAPV5bde7cM2SZP_M.tJNG3rEuopsYZcivSHyz8ME0YtiKRDubf7fVKrayS5i9V75FAGUWg8XQ66jRp1z
7EHh9aAZ5bK5gXasPtnPtaMLSFAz1ACw9p1Rf8lUL6XFWOsVfiW0S.Pb0fNFKBhW0ExxyeP2HVnxaFaws8gRXAvcrooeHaZiLD4gm9t.bMRMaYnIOB9
kS.6LdRQ2B2BBYh5wrsJ4Ye_qr7fqJdFjG.Bve4CQZRDXqt0iJNG4l.UoQyDIm4aUcbvBrDCkY_IOVCuZA.fdiVjKy_yuvbRGO5b1Wv_Zk2uZxlaDmk
pQ_rk1uDvaOryUAvM7QwCa7ahXxnjDDC24EKWUpTMTHzEbVrUP_yT8c.0f8Hk9X9gBaF69Q73A_ela5hij_a7FFkCQp',mdrd: '',};var a =
document.createElement('script');a.src = '/cdn-cgi/challenge-platform/h/g/orchestrate/chl_page/v1?
ray=9b30ba699a2c5e5b';window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ?
'#' : location.hash;window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0,
location.href.length - window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;if
(window.history && window.history.replaceState) {var ogU = location.pathname + window._cf_chl_opt.cOgUQuery +
window._cf_chl_opt.cOgUHash;history.replaceState(null, null,"\/backend-api\/codex\/responses?
__cf_chl_rt_tk=zVMRUF7MTH4JjsxVKUg3rs4Ru6Y7Nitr8dTtjdfHzNI-1766585908-1.0.1.1-
gaGPrKw2fwSkCBJTE0NJ5neZe24nhRlh6bYGdo7atcw"+ window._cf_chl_opt.cOgUHash);a.onload = function()
{history.replaceState(null, null, ogU);}}document.getElementsByTagName('head')[0].appendChild(a);}());</script></
body></html>, request id: 9b30ba699a2c5e5b-GRU
What steps can reproduce the bug?
Uploaded thread: 019b50b8-6f75
What is the expected behavior?
_No response_
Additional information
_No response_
20 Comments
This is likely a Cloudflare bot detection issue rather than a Codex bug.
i understand, but from a user perspective it makes no difference at all. i pay for codex and i haven’t been able to use it for more than 15 hours already. if the problem is with third parties, it doesn’t change the fact that
That makes sense.
Let me check and get back to you.
On Wed, Dec 24, 2025 at 11:00 PM Pedro Penha Verani <
@.***> wrote:
File:
codex-rs/core/src/error.rsEnhanced
UnexpectedResponseError::friendly_message()to detect Cloudflare challenge pages by identifying common markers and providing clearer, actionable error messages, with tests added to validate challenge detection.File:
codex-rs/core/src/api_bridge.rsAdded specific handling for 403 Forbidden responses by detecting Cloudflare challenge pages, converting them into retryable Stream errors with a suggested 2-second retry delay, while preserving the request ID for debugging.
File:
codex-rs/core/src/default_client.rsEnabled
.cookie_store(true)on the reqwest client builder to persist and automatically send cookies, improving compatibility with Cloudflare session handling and authentication flows.File:
codex-rs/core/src/default_client.rsAdded browser-like request headers (
Accept,Accept-Language, andAccept-Encoding) to make requests appear more human and reduce bot detection.From the logs, I can see that you are attempting to use codex from a region that is not currently supported. For a full list of supported regions, refer to this documentation.
Nope.. I'm using codex from the same region I use since August .
i don’t use a vpn, i don’t use a proxy, i don’t use anything. from one second to the next, starting yesterday, i suddenly couldn’t use codex anymore and started getting this error. it’s been almost 20 hours without being able to use it.
<img width="1341" height="519" alt="Image" src="https://github.com/user-attachments/assets/f4237886-fb78-4c1c-886a-b621d61826e8" />
my ip is from brazil, as it has always been
Please review my PR
@pedrosarkis, I think I was looking at the wrong log file. You didn't provide a full thread ID above. I was attempting to find your information using the truncated thread ID you provided. Please repro the problem and use the
/feedbackcommand to upload your logs, then paste the full thread ID here.Also, I'm not sure what you mean by the statement "perform a git pull on the branch master." Are you having trouble pulling from the
openai/codexgit repo? Or are you having trouble using codex?well, i don’t understand. i already opened this thread through /feedback using the link from codex itself. and the git pull, i was just showing what i asked codex to do. my prompt was “do a git pull”, that’s it
check this, it happened again.
Or mention your thread ID 019b5170-45c7-7c70-b8ae-479fcb90801e in an existing issue.
it’s not a single request that errors out. in this last thread for example, i asked for something, it did a 10 minute implementation, then i asked for another thing, and at some request during that second one it started erroring out
Hello everyone, I'm having the same error. I installed the Codex CLI (v0.77.0) today and requested the following commands:
And in the middle of the refactoring, the error started: "unexpected status 403 Forbidden:"
I sent a feedback by codex, thread ID 019b5171-6011-7e70-9177-e07fc99ca747.
I don't use VPNs or proxies, and I live in Brazil.
@pedrosarkis, thanks for uploading the new logs. That's helpful. From this log, I can see the 403 error that you're experiencing.
@edsonlnunes, thanks for uploading your logs as well.
@princedev-toptal, I think your diagnosis is correct. This looks like a cloudflare bot detection issue. We're seeing a small uptick in these false positive detections over the past few days.
I'm not sure if this helps, but I can't even use my account on the ChatGPT web, I get 429 on every message. And I've never used scripts or anything, I use the account alone. Pro plan
<img width="1105" height="533" alt="Image" src="https://github.com/user-attachments/assets/5b3e0c17-e3a5-44d8-838f-70609d6cb43d" />
Same issue https://github.com/openai/codex/issues/new?template=2-bug-report.yml&steps=Uploaded%20thread:%20019b5311-7695-75d0-a4fb-7d49cfb0ce44
Randomly quits.
Very frustraiting.
We've updated our CloudFlare policies to mitigate the problem.
Apologies for not fixing this more quickly. Most of the Codex team is on holiday break, and we're being cautious about making any infrastructure changes that could introduce regressions.
I'm going to close this issue. If you are still encountering a 403 error, let us know.
@etraut-openai I'm receiving 403 when asking codex to push code. Internet access is fully allowed
@tictproject, that's not related to this issue. This issue involved a 403 error when access the responses endpoint (used to sample the cloud-based model).