Codex Windows App/CLI receives Cloudflare challenge HTML from discovery endpoints; disabling apps/plugins/tool_suggest fixes it
What version of the Codex App are you using (From “About Codex” dialog)?
26.506.3741.0
What subscription do you have?
Pro
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Codex on Windows can reach the model path and complete codex exec, but optional discovery endpoints return a Cloudflare Managed Challenge HTML page instead of the expected JSON.
Observed diagnostic result before workaround:
CLI_WEBSOCKET: SEEN
MODEL_RESULT: OK
CHALLENGE: FOUND
DISCOVERY_ENDPOINT: CHALLENGED_OR_TOUCHED
The returned HTML included:
<noscript>
<div class="h2">
<span id="challenge-error-text">Enable JavaScript and cookies to continue</span>
</div>
</noscript>
The challenged endpoint observed was:
https://chatgpt.com/backend-api//connectors/directory/list?external_logos=true
Related optional discovery endpoints also appear affected:
/backend-api/plugins/featured
/backend-api//connectors/directory/list?external_logos=true
The core model request still succeeded and returned:
codex
OK
tokens used
1,348
OK
After disabling optional discovery-related features, the challenge disappeared:
codex features disable apps
codex features disable plugins
codex features disable tool_suggest
After that:
MODEL_RESULT: OK
CHALLENGE: NOT FOUND
This suggests the issue is not general network connectivity, VPN failure, or WebSocket failure. Generic WSS worked, Codex model WebSocket worked, but app/plugin/tool discovery endpoints were being challenged by Cloudflare in a non-browser client context.
What steps can reproduce the bug?
- Use Codex App / Codex CLI on Windows with ChatGPT authentication.
- Ensure optional discovery features are enabled:
codex features list
Relevant features before mitigation:
apps = true
plugins = true
tool_suggest = true
- Run this diagnostic command:
powershell -NoProfile -ExecutionPolicy Bypass -Command "$log=\"$env:USERPROFILE\.codex\log\codex-tui.log\"; if(Test-Path $log){Clear-Content $log}; $env:RUST_LOG='codex_api::endpoint::responses_websocket=info,codex_core=warn,codex_tui=warn'; $out = codex exec --skip-git-repo-check 'Reply exactly OK' 2>&1; $logText = if(Test-Path $log){Get-Content $log -Raw}else{''}; $all = ($out -join \"n\") + \"n\" + $logText; if($all -match 'successfully connected to websocket|connecting to websocket|backend-api/codex/responses'){'CLI_WEBSOCKET: SEEN'}else{'CLI_WEBSOCKET: NOT LOGGED'}; if($all -match 'codex\s+OK|`nOK\s*$'){'MODEL_RESULT: OK'}else{'MODEL_RESULT: NOT_OK'}; if($all -match '403 Forbidden|Enable JavaScript|cf_chl|cf-mitigated|challenge'){'CHALLENGE: FOUND'}else{'CHALLENGE: NOT FOUND'}; if($all -match 'connectors/directory|plugins/featured'){'DISCOVERY_ENDPOINT: CHALLENGED_OR_TOUCHED'}else{'DISCOVERY_ENDPOINT: NOT SEEN'}"
- Observed output:
CLI_WEBSOCKET: SEEN
MODEL_RESULT: OK
CHALLENGE: FOUND
DISCOVERY_ENDPOINT: CHALLENGED_OR_TOUCHED
- Disable optional discovery-related features:
codex features disable apps
codex features disable plugins
codex features disable tool_suggest
- Fully restart the Windows Codex app:
taskkill /IM Codex.exe /F
- Re-run a simple Codex command:
powershell -NoProfile -ExecutionPolicy Bypass -Command "$out = codex exec --skip-git-repo-check 'Reply exactly OK' 2>&1; $all=$out -join \"`n\"; if($all -match 'OK'){'MODEL_RESULT: OK'}else{'MODEL_RESULT: NOT_OK'}; if($all -match '403 Forbidden|Enable JavaScript|cf_chl|cf-mitigated|challenge'){'CHALLENGE: FOUND'}else{'CHALLENGE: NOT FOUND'}"
- Observed after disabling features:
MODEL_RESULT: OK
CHALLENGE: NOT FOUND
What is the expected behavior?
Codex App/CLI should not send non-browser HTTP requests to discovery endpoints in a way that receives Cloudflare challenge HTML instead of JSON.
Expected behavior:
- Model/WebSocket path should continue working.
- Optional app/plugin/tool discovery should either use a client-supported authenticated endpoint that does not trigger Cloudflare browser challenges, or gracefully skip/fallback without injecting challenge HTML into CLI/app output or logs.
- The Windows Codex app should not require users to disable apps, plugins, or tool_suggest manually to avoid Cloudflare challenge responses.
- If discovery endpoints are blocked/challenged, the UI/CLI should show a clear actionable warning instead of raw Cloudflare HTML.
Additional information
This was tested on Windows with Mullvad VPN.
The VPN does not appear to be the root cause based on the following checks:
Generic WebSocket over WSS worked:
CONNECTED: generic WSS opened
REPLY: hello
Cloudflare DNS and TCP 443 reachability worked through Mullvad:
NameResolutionSucceeded: True
TcpTestSucceeded: True
InterfaceAlias: Mullvad
RemotePort: 443
Codex model path also worked:
CLI_WEBSOCKET: SEEN
MODEL_RESULT: OK
The failure was isolated to optional discovery endpoints such as:
/backend-api//connectors/directory/list?external_logos=true
/backend-api/plugins/featured
The workaround was:
codex features disable apps
codex features disable plugins
codex features disable tool_suggest
taskkill /IM Codex.exe /F
After this workaround, the challenge disappeared:
MODEL_RESULT: OK
CHALLENGE: NOT FOUND
This looks related to existing Cloudflare challenge reports for plugins/featured and connectors/directory/list, but this report adds a Windows Codex App/CLI reproduction and a working mitigation.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗