[Bug] reqwest HTTP clients missing User-Agent override β Cloudflare 403 from HKG edge on Codex Desktop 26.422.x
### π Update 2026-04-24 β Root cause identified (client-side bug) Diagnosed with curl probes: OpenAI's Cloudflare WAF on the HKG POP blocksreqwest/*User-Agent (β 403<html>). Multiple Rust HTTP clients inside Codex Desktop (codex_analytics,codex_core::plugins::manager,codex_core::plugins::startup_sync) don't override the UA, so those backend calls 403 at the edge. UI starvation of plugin/feature-flag data produces every symptom listed below. Full analysis, curl evidence table, and log excerpts in [this comment β](#issuecomment-REPLACE_AFTER_POSTING). Fix: setUser-Agent: Codex-Desktop/<ver>on allreqwest::Clients, or allowlistreqwest/*at the Cloudflare edge.
---
What version of the Codex App are you using (From βAbout Codexβ dialog)?
App/WebView release: 26.421.11020
Store package: OpenAI.Codex_26.421.620.0_x64__2p2nqsd0c76g0
What subscription do you have?
Paid ChatGPT subscription
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Update (Apr 23, 2026)
This does not look like an account entitlement issue, but it also no longer looks like ordinary recoverable local-state corruption.
The breakage started immediately after clicking the in-app upgrade button in Codex Desktop on Windows. Before that upgrade, the desktop app was working normally on this machine.
The problem still persists after reinstall, local state rebuild, switching networks, forcing an external codex.exe, and full package reset (Reset-AppxPackage).
Fresh post-reset logs still show:
Bundled plugins marketplace has no enabled plugins.unsupported feature enablement 'realtime_conversation'
Current package/build:
OpenAI.Codex_26.421.620.0_x64__2p2nqsd0c76g0- App/WebView release:
26.421.11020
At this point this looks more like a Windows desktop regression introduced by the in-app upgrade than recoverable local file corruption.
Update (Apr 23, 2026)
This is no longer best explained as stale local state from account switching.
The breakage started immediately after clicking the in-app upgrade button in Codex Desktop on Windows. Before that upgrade, the desktop app was working normally on this machine.
Symptoms now include:
- display language / locale override does not apply correctly
- slash commands do not open when typing
/ - Fast Mode is missing / not selectable in the desktop app
- plugin / command picker behavior is broken
- desktop UI font behavior does not reflect expected UI settings
I have now verified that the issue persists after:
- Microsoft Store reinstall
- rebuilding
%USERPROFILE%\\.codex - logging out and back in
- switching networks, including Vietnam mobile hotspot
- forcing an external
codex.exe Reset-AppxPackageforOpenAI.Codex
Fresh post-reset logs still show:
Bundled plugins marketplace has no enabled plugins.unsupported feature enablement 'realtime_conversation': currently supported features are apps, plugins, tool_search, tool_suggest, tool_call_mcp_elicitation
Sentry also still shows Statsig initialization failing behind Cloudflare:
https://ab.chatgpt.com/v1/initialize ...- blocked on
oaistatsig.com - Cloudflare Ray ID:
9f0bdf410b720723
Current package/build:
- Store package:
OpenAI.Codex_26.421.620.0_x64__2p2nqsd0c76g0 - App/WebView release:
26.421.11020
At this point this looks more like a Windows desktop regression introduced by the upgrade than recoverable local file corruption.
Iβm seeing a Windows Codex desktop app state bug that persists across reinstallations.
Symptoms:
- After switching between multiple accounts on the same Windows machine, settings become inconsistent.
- Display language does not apply correctly.
- In some cases, the Settings entry becomes unavailable or the Settings page cannot be used properly.
- The βBack to appβ / navigation controls in Settings may appear disabled or do nothing.
- Reinstalling from Microsoft Store does not fix it.
- Renaming or rebuilding the entire
%USERPROFILE%\.codexfolder does not fix it. - Copying a known-good
.codex-global-state.jsonandconfig.tomlfrom another machine also does not fix it. - The same account works normally on another computer, so this does not appear to be an account entitlement issue.
What I tried:
- Fully exited the app and rebooted Windows multiple times.
- Uninstalled and reinstalled the Codex app from Microsoft Store multiple times.
- Renamed the entire
%USERPROFILE%\.codexdirectory and let the app recreate it. - Manually set
"localeOverride": "zh-CN"in.codex-global-state.json. - Copied known-good config files from another Windows machine where the same account works correctly.
Expected behavior:
- Settings should remain usable after account switching.
- Language selection / override should apply correctly.
- The same account should behave consistently across machines.
Actual behavior:
- On this specific Windows machine, settings can become unusable, the language state is wrong, and the app does not recover even after reinstalling or rebuilding the local
.codexstate.
What steps can reproduce the bug?
- Install the Codex desktop app from Microsoft Store on Windows 11.
- Sign in with one account and use the app normally.
- Sign out and switch to another account on the same machine.
- Repeat account switching multiple times.
- Open Settings or try to change the display language.
- Restart the app and/or reboot Windows.
Result:
- Settings may become unavailable or unusable.
- The display language may not apply correctly.
- On the affected machine, the problem persists even after reinstalling the app and rebuilding the
%USERPROFILE%\.codexdirectory.
What is the expected behavior?
- Switching between accounts should not corrupt local app state.
- Settings should remain accessible and functional.
- Language changes should apply correctly after restart.
- Reinstalling the app or rebuilding local state should restore normal behavior if local state is the cause.
- The same account should behave consistently across different computers.
Additional information
- The same account works normally on another computer.
- This appears to be machine-specific or local-state-related rather than an account entitlement issue.
- I already tried:
- rebooting Windows multiple times
- fully exiting the app
- uninstalling and reinstalling from Microsoft Store multiple times
- renaming/rebuilding the entire
%USERPROFILE%\.codexfolder - manually setting
"localeOverride": "zh-CN"in.codex-global-state.json - copying known-good config files from another working Windows machine
- The issue still persists on this machine.
- In some cases, the Settings button/page becomes unusable or appears disabled.
9 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Updated the issue body with post-reset diagnostics.
Key new point: this started immediately after the in-app desktop upgrade, and still reproduces after reinstall,
%USERPROFILE%\.codexrebuild, switching networks, forcing an externalcodex.exe, and fullReset-AppxPackage.Fresh post-reset logs still show:
Bundled plugins marketplace has no enabled plugins.unsupported feature enablement 'realtime_conversation'Further diagnostics after forced re-login and workspace-state reset:
Additional update (Apr 24, 2026)
I have more concrete evidence now. The issue is not just account state, and it is not fixed by forced re-login.
New desktop findings:
New workspace-binding findings:
D:\luosiwangcorrectly and I could see the previous project-related content again.ENOENT: path does not exist: ~ENOENT: path does not exist: /mnt/d/luosiwang/d:\luosiwangImportant implication:
What I tried on desktop:
%USERPROFILE%\.codexcodex.exeReset-AppxPackageforOpenAI.Codex%USERPROFILE%\.codex\auth.json%USERPROFILE%\.codex\cap_sidelectron-saved-workspace-rootsproject-orderactive-workspace-rootsD:\luosiwangResult after all of the above:
Related VS Code extension findings:
openai.chatgpt-26.5417.40842restored the extension enough to be usable again on this machine.
Current conclusion:
Root cause identified β this is a client-side bug, not an environment issue
Diagnosed on the affected machine with curl probes against the same Cloudflare
edge that Codex Desktop is hitting. All symptoms reduce to one cause: some
Rust
reqwestHTTP clients inside Codex are not overriding the defaultUser-Agent, so requests from those clients get 403'd by OpenAI's WAF.
Environment
package
OpenAI.Codex_2p2nqsd0c76g0)9f13cf24fae90707-HKG(Hong Kong POP)different Codex version / different CF routing.
curl probes β same machine, same network, varying only User-Agent
| UA | URL | Status |
|---|---|---|
|
Mozilla/5.0 ... Chrome/131|https://chatgpt.com/| 200 ||
Mozilla/5.0 ... Chrome/131|.../backend-api/plugins/featured| 401 (auth needed β OK, CF passes) ||
Codex-Desktop/26.422.2437.0|.../backend-api/plugins/featured| 401 (OK) ||
codex-desktop/codex/1.0/Electron/Codex|.../backend-api/plugins/featured| 401 (OK) ||
reqwest/0.12.0|.../backend-api/plugins/featured| 403<html>...β ||
curl/8.x(default) |.../backend-api/plugins/featured| 403<html>...β ||
OpenAI/Codex|.../backend-api/plugins/featured| 403<html>...β |Conclusion: OpenAI's Cloudflare WAF (on the HKG POP at least) blocks the bare
reqwest/*UA.Codex-Desktop/...passes. Any Codex internal HTTP clientthat forgets to set the UA override falls through to
reqwest's default andgets 403'd.
Matching evidence from
~/.codex/logs_2.sqliteCross-posted to OpenAI Community for staff visibility:
https://community.openai.com/t/codex-desktop-windows-msix-hkg-edge-returns-403-reqwest-ua-not-overridden-empty-plugins-marketplace-slash-commands-gone-fast-mode-missing/1379677
Tagging folks who've been most active on Desktop / plugins / Windows issues recently β
apologies for the ping, but this has been open 3 days with no triage response and the
root cause is confirmed (reqwest UA + CF 403 at HKG edge, reproducible via curl):
@etraut-openai β you've been closing the bulk of Desktop bug reports lately
@xli-oai β plugin install writes / marketplace RPC is exactly what's broken here
@iceweasel-oai β Windows-side specialist, this is Windows MSIX specific
@tibo-openai β senior eyes on a client/server CF-WAF interaction issue
TL;DR:
curl -A "reqwest/0.12.0" https://chatgpt.com/backend-api/plugins/featuredreturns 403 from CF-RAY ...-HKG. Same URL with a browser UA returns 200. Some Codex
reqwest clients aren't setting a UA, so CF blocks them. Either (a) set UA on
codex_analytics,codex_core::plugins::manager::warm_featured_plugins, andcodex_core::plugins::startup_sync, or (b) allowlistreqwest/*at CF edge.Happy to test any proposed fix from the affected machine.
@etraut-openai / @xli-oai / @iceweasel-oai / @tibo-openai
Additional VS Code extension regression evidence:
I downgraded the VS Code extension back to
openai.chatgpt-26.5417.40842-win32-x64, and with that version everything works normally again on the same machine.After upgrading to the newer VS Code extension version, I can reproduce the same failure family as Codex Desktop. The current installed version on my machine is
openai.chatgpt-26.5422.21459-win32-x64.The VS Code extension logs now show the bundled Codex app-server hitting the same 403 failures:
codex_core::plugins::startup_sync:https://chatgpt.com/backend-api/plugins/listreturns 403codex_core::plugins::manager:https://chatgpt.com/backend-api/plugins/featuredreturns 403codex_analytics::client: analytics events also return 403The response body is Cloudflare challenge HTML, matching the curl User-Agent diagnosis.
I also noticed a new sync symptom in the VS Code extension: chat history does not reliably sync by itself. I have to reopen Codex Desktop before the VS Code extension sees the updated chat history again.
The VS Code logs also show app-server transport pressure after startup, including messages like:
dropping overload response ... outbound queue is fullServer overloaded; retry later.So this looks like the newer VS Code extension and Codex Desktop share the same underlying Codex runtime / HTTP client regression. The older VS Code extension version
26.5417.40842works normally, while newer versions reproduce the 403/plugin/history-sync failure family on the same machine, same account, same network.Update after upgrading to 26.422.3464.0 / app-server 0.125.0-alpha.3
Bug not fixed in latest version. Same root cause confirmed, with new evidence:
4 endpoints now confirmed affected (from logs after reboot, fresh build):
chatgpt.com/backend-api/plugins/featuredβ 403chatgpt.com/backend-api/plugins/listβ 403ab.chatgpt.com/otlp/v1/metricsβ 403 (new)chatgpt.com/backend-api/codex/analytics-events/eventsβ 403 (new)Critical narrowing: REST HTTP requests fail, WebSocket works fine.
The model-streaming WebSocket (
responses_websocketviatokio-tungstenite) connectsand streams responses normally β the user can chat with the model. Only the
reqwest-based REST clients fail.
β This isolates the bug to the Rust
reqwestHTTP client stack specifically.The WebSocket stack uses different connection logic with a different default UA,
which CF doesn't block.
Affected modules from logs:
codex_analytics::client(analytics-events)codex_core::plugins::manager::warm_featured_plugins(plugins/featured)codex_core::plugins::startup_sync(plugins/list)opentelemetry-otlpHttpMetricsClient (otlp/v1/metrics) β usesreqwest::blockingLikely upstream cause of #19239 too β
enable_i18nfeature flag fetch#19239 reports that Codex Desktop UI doesn't switch language despite
localeOverride=zh-CNand--lang=zh-CN. The reporter (correctly) suspectsa remote feature flag
enable_i18nis gated.This is almost certainly the same CF 403 root cause. The feature-flag
fetch is yet another reqwest HTTP call that's 403'd at the HKG edge β flag
defaults to false β i18n strings never loaded β UI stays English.
So the symptom cluster downstream of this single bug now includes:
Strongly suggest cross-linking #19239 β fixing the reqwest UA / CF allowlist
will likely close that issue too.
I can reproduce a very similar User-Agent-dependent Cloudflare challenge from a Chromebook/Crostini Linux environment.
Environment:
Diagnostic result from the Chromebook/Crostini environment on the home fiber connection:
cf-mitigated: challengepresentcf-mitigated: challengeabsentThis suggests that, at least in my environment, the Cloudflare block is not solely caused by TLS fingerprinting. HTTP-layer signals such as User-Agent appear to affect the decision. The 401 response indicates that the request passed Cloudflare and reached the application layer, while the 403 response was a Cloudflare challenge.
I also searched the Codex repository for
user_agent. I could find User-Agent setup in tests, but I could not find clear production code ensuring that all reqwest clients set a Codex-specific User-Agent.This seems consistent with this issueβs hypothesis that some reqwest-based HTTP clients may be using a default or missing User-Agent and getting challenged by Cloudflare.