{"record":{"id":"99e99131ca35f1f4","repo":"openai/codex","slug":"permission-profiles-requiring-direct-runtime-enfor","errorCode":null,"errorMessage":"permission profiles requiring direct runtime enforcement are incompatible with --use-legacy-landlock","messagePattern":"permission profiles requiring direct runtime enforcement are incompatible with --use-legacy-landlock","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/linux-sandbox/src/linux_run_main.rs","lineNumber":391,"sourceCode":"}\n\nfn ensure_inner_stage_mode_is_valid(apply_seccomp_then_exec: bool, use_legacy_landlock: bool) {\n    if apply_seccomp_then_exec && use_legacy_landlock {\n        panic!(\"--apply-seccomp-then-exec is incompatible with --use-legacy-landlock\");\n    }\n}\n\nfn ensure_legacy_landlock_mode_supports_policy(\n    use_legacy_landlock: bool,\n    file_system_sandbox_policy: &FileSystemSandboxPolicy,\n    network_sandbox_policy: NetworkSandboxPolicy,\n    sandbox_policy_cwd: &Path,\n) {\n    if use_legacy_landlock\n        && file_system_sandbox_policy\n            .needs_direct_runtime_enforcement(network_sandbox_policy, sandbox_policy_cwd)\n    {\n        panic!(\n            \"permission profiles requiring direct runtime enforcement are incompatible with --use-legacy-landlock\"\n        );\n    }\n}\n\nfn run_bwrap_with_proc_fallback(\n    sandbox_policy_cwd: &Path,\n    command_cwd: Option<&Path>,\n    file_system_sandbox_policy: &FileSystemSandboxPolicy,\n    network_sandbox_policy: NetworkSandboxPolicy,\n    inner: Vec<String>,\n    mount_proc: bool,\n    allow_network_for_proxy: bool,\n) -> ! {\n    let network_mode = bwrap_network_mode(network_sandbox_policy, allow_network_for_proxy);\n    let mut mount_proc = mount_proc;\n    let command_cwd = command_cwd.unwrap_or(sandbox_policy_cwd);\n","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/linux-sandbox/src/linux_run_main.rs#L373-L409","documentation":"Error \"permission profiles requiring direct runtime enforcement are incompatible with --use-legacy-landlock\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/linux-sandbox/src/linux_run_main.rs:391 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}