{"record":{"id":"ffc612548df9070b","repo":"openai/codex","slug":"environment-network-policy-violates-managed-requir","errorCode":null,"errorMessage":"environment network policy violates managed requirements: {error}","messagePattern":"environment network policy violates managed requirements: (.+?)","errorType":"validation","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/config/network_proxy_spec.rs","lineNumber":243,"sourceCode":"            spec.constraints.allowlist_expansion_enabled = None;\n        } else {\n            spec.constraints.allowed_domains =\n                Some(spec.config.allowed_domains().unwrap_or_default());\n            spec.constraints.allowlist_expansion_enabled = Some(allow_owner_grants);\n        }\n        spec.constraints.denylist_expansion_enabled = Some(true);\n\n        // Saved grants can extend a reviewable owner policy; owner denials are restored last.\n        let (allowed_domains, denied_domains) = exec_policy.compiled_network_domains();\n        if allow_owner_grants {\n            upsert_network_domains(&mut spec.config, allowed_domains, /*allow*/ true);\n        }\n        upsert_network_domains(&mut spec.config, denied_domains, /*allow*/ false);\n        upsert_network_domains(&mut spec.config, protected_denials, /*allow*/ false);\n        spec.constraints.denied_domains = spec.config.denied_domains();\n\n        validate_policy_against_constraints(&spec.config, &spec.constraints).map_err(|error| {\n            std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                format!(\"environment network policy violates managed requirements: {error}\"),\n            )\n        })?;\n        Ok(spec)\n    }\n\n    pub(crate) fn with_exec_policy_network_rules(\n        &self,\n        exec_policy: &Policy,\n    ) -> std::io::Result<Self> {\n        let mut spec = self.clone();\n        apply_exec_policy_network_rules(&mut spec.config, exec_policy);\n        validate_policy_against_constraints(&spec.config, &spec.constraints).map_err(|err| {\n            std::io::Error::new(\n                std::io::ErrorKind::InvalidInput,\n                format!(\"network proxy constraints are invalid: {err}\"),\n            )","sourceCodeStart":225,"sourceCodeEnd":261,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/config/network_proxy_spec.rs#L225-L261","documentation":"The environment-supplied network policy, after merging owner grants/denials and managed requirements, violates the managed constraints (e.g. allows domains the managed requirements deny). The constraint violation error is wrapped in this message and the environment cannot start with that policy.","triggerScenarios":"Thrown at codex-rs/core/src/config/network_proxy_spec.rs:243 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Adjust the environment network policy to satisfy the managed requirements."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}