feat: add network proxy feature flag#20147
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94f65a149e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
94f65a1 to
331f15f
Compare
dfe2b90 to
bae703b
Compare
This was referenced May 2, 2026
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
43785af to
6168062
Compare
Co-authored-by: Codex noreply@openai.com
bolinfest
approved these changes
May 11, 2026
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
The permissions migration is making
permissions.<profile>.network.enabledthe canonical sandbox network bit, while proxy startup is a separate concern. Enabling network access should not implicitly start the proxy, and users who are still on legacy sandbox modes need a separate place to opt into proxy startup and provide proxy-specific settings.This follow-up to #19900 gives the network proxy its own feature surface instead of overloading permission-profile network semantics.
What changed
network_proxyfeature with a configurable[features.network_proxy]table.features.network_proxysettings onto the configured proxy state after permission-profile selection, so the proxy only starts when the activeNetworkSandboxPolicyalready allows network access.[experimental_network]startup behavior independently of the new feature flag.Behavior and examples
There are now three related knobs:
permissions.<profile>.network.enabledcontrols whether the active permission profile has network access at all.features.network_proxyenables proxy restrictions for an already-network-enabled profile.sandbox_modeplus[sandbox_workspace_write].network_accessstill control whether legacyworkspace-writehas network access at all.The rule is:
For permission profiles, the feature toggle adds proxy restrictions only when network access is already enabled:
If
network.enabled = false, the same feature flag is a no-op: network remains off and the proxy does not start.For legacy sandbox config,
network_accessremains the master switch:That keeps legacy
workspace-writenetwork access on, but routes it through the proxy policy. Ifnetwork_access = false, the proxy feature is a no-op and legacyworkspace-writeremains offline.The same proxy opt-in can be supplied from the CLI:
codex -c 'features.network_proxy=true'Additional proxy settings can be supplied when a table is needed:
The intended behavior matrix is:
features.network_proxynetwork.enabled = falsenetwork.enabled = falsenetwork.enabled = truenetwork.enabled = trueworkspace-writenetwork_access = falseworkspace-writenetwork_access = falseworkspace-writenetwork_access = trueworkspace-writenetwork_access = true[experimental_network]requirements remain separate from the user feature toggle and still start the proxy on their own.Relevant code:
features/src/feature_configs.rsdefines the feature-specific proxy config.core/src/config/mod.rsreads the feature table, and later applies it only when network access is already enabled.Verification
Added focused coverage for:
features.network_proxyis enabled but sandbox network access is disabledworkspace-writematrix above[experimental_network]startup without the featureRan:
cargo test -p codex-featurescargo test -p codex-core network_proxy_featurecargo test -p codex-core experimental_network_requirements_enable_proxy_without_feature