openai/codex · error · std::io::Error
environment network policy requires managed network enforcem
Error message
environment network policy requires managed network enforcement
What it means
Error "environment network policy requires managed network enforcement" thrown in openai/codex.
Source
Thrown at codex-rs/core/src/config/network_proxy_spec.rs:189
self.base_config.clone(),
self.requirements.clone(),
permission_profile,
)
}
/// 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,View on GitHub (pinned to 339751715c)
Solutions
- Enable managed network enforcement for the environment before applying this network policy.
When it happens
Trigger: Thrown at codex-rs/core/src/config/network_proxy_spec.rs:189 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/49e5a95dc8d0b5c6.
Report an issue: GitHub.