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

environment network policy cannot override a disabled contro

Error message

environment network policy cannot override a disabled controller proxy

What it means

Error "environment network policy cannot override a disabled controller proxy" thrown in openai/codex.

Source

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

    /// Returns the effective traffic policy without exposing controller-owned proxy settings.
    pub fn environment_policy(&self) -> EnvironmentNetworkPolicy {
        EnvironmentNetworkPolicy::from_config(&self.config, self.hard_deny_allowlist_misses)
    }

    pub(crate) fn for_environment(
        controller: Option<&Self>,
        policy: &EnvironmentNetworkPolicy,
        permission_profile: &PermissionProfile,
        exec_policy: &Policy,
    ) -> std::io::Result<Self> {
        if matches!(permission_profile, PermissionProfile::Disabled) {
            return Err(std::io::Error::new(
                std::io::ErrorKind::InvalidInput,
                "environment network policy requires managed network enforcement",
            ));
        }
        if controller.is_some_and(|controller| !controller.enabled()) {
            return Err(std::io::Error::new(
                std::io::ErrorKind::InvalidInput,
                "environment network policy cannot override a disabled controller proxy",
            ));
        }
        let mut spec = match controller {
            Some(controller) => controller.recompute_for_permission_profile(permission_profile)?,
            None => Self::from_config_and_constraints(
                NetworkProxyConfig {
                    enabled: true,
                    // Without a controller, the owner supplies the entire permission ceiling.
                    dangerously_allow_all_unix_sockets: true,
                    allow_local_binding: true,
                    ..NetworkProxyConfig::default()
                },
                /*requirements*/ None,
                permission_profile,
            )?,
        };

View on GitHub (pinned to 339751715c)

Solutions

  1. Enable the controller proxy, or remove the environment network policy that tries to override it.

When it happens

Trigger: Thrown at codex-rs/core/src/config/network_proxy_spec.rs:195 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/888184b7d10fbc2b. Report an issue: GitHub.