openai/codex · error · std::io::Error

network proxy constraints are invalid

Error message

network proxy constraints are invalid: {err}

What it means

NetworkProxySpec::from_config_and_constraints failed while applying managed network requirements to the proxy config: the resulting constraints (e.g. allowed/denied domains, enforcement flags) are inconsistent or invalid per the constraints validator. The underlying error is wrapped in this message.

Solutions

  1. Fix the network proxy constraint values per the reported error.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at codex-rs/core/src/config/network_proxy_spec.rs:121 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/e487215ea2b0e457. Report an issue: GitHub.

Appendix: source

Thrown at codex-rs/core/src/config/network_proxy_spec.rs:121

        requirements: Option<NetworkConstraints>,
        permission_profile: &PermissionProfile,
    ) -> std::io::Result<Self> {
        let base_config = config.clone();
        let hard_deny_allowlist_misses = requirements
            .as_ref()
            .is_some_and(Self::managed_allowed_domains_only);
        let (config, constraints) = if let Some(requirements) = requirements.as_ref() {
            Self::apply_requirements(
                config,
                requirements,
                permission_profile,
                hard_deny_allowlist_misses,
            )
        } else {
            (config, NetworkProxyConstraints::default())
        };
        validate_policy_against_constraints(&config, &constraints).map_err(|err| {
            std::io::Error::new(
                std::io::ErrorKind::InvalidInput,
                format!("network proxy constraints are invalid: {err}"),
            )
        })?;
        Ok(Self {
            base_config,
            requirements,
            config,
            constraints,
            hard_deny_allowlist_misses,
        })
    }

    pub async fn start_proxy(
        &self,
        permission_profile: &PermissionProfile,
        policy_decider: Option<Arc<dyn NetworkPolicyDecider>>,
        blocked_request_observer: Option<Arc<dyn BlockedRequestObserver>>,

View on GitHub (pinned to 339751715c)