Repository navigation
[codex] Preserve proxy state for filesystem sandbox helpers - #29671
Merged
Merged
Conversation
pakrym-oai
approved these changes
Jun 23, 2026
iceweasel-oai
force-pushed
the
codex/preserve-fs-helper-proxy-state
branch
from
June 23, 2026 18:57
a9fa539 to
5367b6f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Filesystem helpers intentionally run with a minimal environment that excludes proxy variables. After filesystem operations started using the Windows sandbox wrapper, the wrapper derived an empty proxy configuration from that helper environment and compared it with the persistent sandbox setup marker. When the marker contained proxy ports, every filesystem operation appeared to require a firewall update, which could launch elevated setup, show a UAC or loader dialog, and fail operations such as
apply_patchwith error 1223.Filesystem helpers do not use network access, so they should preserve the proxy/firewall state established by normal sandboxed process launches.
What changed
Validation
cargo build -p codex-cli --bin codexjust test -p codex-windows-sandbox preserving_proxy_settings_uses_the_existing_markerjust test -p codex-windows-sandbox windows_wrapper_args_round_tripjust test -p codex-windows-sandbox setup_request_prefers_explicit_proxy_settingsjust test -p codex-sandboxing transform_for_direct_spawn_windowsjust test -p codex-exec-server fs_sandbox::testsfs/writeFilereproduction against published0.142.0-alpha.6and the new CLI. The published CLI launched elevated setup and failed withShellExecuteExW ... 1223; the new CLI completed without elevation.Related to #28359.