Windows Codex elevated sandbox repeatedly fails when Codex is launched with HTTP_PROXY/HTTPS_PROXY to localhost proxy
Open 💬 3 comments Opened Jun 29, 2026 by STHxiao
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of the Codex App are you using (From “About Codex” dialog)?
Codex App: 26.623.8305.0
What subscription do you have?
Plus
What platform is your computer?
- Codex App: 26.623.8305.0 - Command runner: 0.142.3 - Windows - config.toml: [windows] sandbox = "elevated"
What issue are you seeing?
Windows Codex elevated sandbox repeatedly fails when Codex is launched with HTTP_PROXY/HTTPS_PROXY to localhost proxy
What steps can reproduce the bug?
- Launch Codex normally from Start Menu.
- Run apply_patch or shell commands: no error.
- Close Codex.
- Launch Codex via a script that sets:
HTTP_PROXY=http://127.0.0.1:7892
HTTPS_PROXY=http://127.0.0.1:7892
NO_PROXY=localhost,127.0.0.1,::1
- Run apply_patch or shell commands.
- Windows popup appears:
codex-windows-sandbox-setup.exe 找不到指定的模块
What is the expected behavior?
Codex elevated sandbox should handle localhost proxy settings without repeatedly refreshing firewall/sandbox state or launching a broken setup helper.
Additional information
Workaround:
- Launch Codex normally without proxy script, or
- Set [windows] sandbox = "unelevated" when using the proxy launcher.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I may be hitting a closely related issue, although my trigger is TUN mode rather than explicit
HTTP_PROXY/HTTPS_PROXYenvironment variables.Environment:
26.623.13972.00.142.5[windows] sandbox = "elevated"0.0.0.0/0 -> 198.18.0.2HTTP_PROXY,HTTPS_PROXY, orNO_PROXYenvironment variables are setbase_url = "http://127.0.0.1:15721/v1"Observed behavior:
After reboot, the first launch of Codex Desktop often asks me to configure the sandbox again. After that first launch, subsequent launches usually work normally.
This makes me suspect that the root cause may be the same class of issue as this one: elevated Windows sandbox setup/helper refresh interacting badly with local proxy/network state during startup. In my case the proxy is not injected through environment variables, but through a TUN interface that owns the default route shortly after boot.
I checked the sandbox logs, and I can see multiple
setup refreshruns, usually ending with:Current sandbox marker also shows:
So this may not be limited to
HTTP_PROXY/HTTPS_PROXY; elevated sandbox setup may also be sensitive to local TUN-mode proxy routing or startup timing after reboot.A possible repro path:
[windows] sandbox = "elevated".I reviewed the suggested duplicates. #29938 looks like the closest related issue, but my case is not an exact duplicate: I do not have
HTTP_PROXY/HTTPS_PROXYset, and my currentsetup_marker.jsonhas"proxy_ports": []. The trigger appears to be TUN-mode routing plus Windows elevated sandbox startup timing after reboot, rather than an observedstored_ports/desired_portsmismatch duringapply_patch.