{"record":{"id":"f2fdcdcedb6996d3","repo":"openai/codex","slug":"error-applying-legacy-linux-sandbox-restrictions","errorCode":null,"errorMessage":"error applying legacy Linux sandbox restrictions: {e:?}","messagePattern":"error applying legacy Linux sandbox restrictions: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/linux-sandbox/src/linux_run_main.rs","lineNumber":332,"sourceCode":"            &sandbox_policy_cwd,\n            command_cwd.as_deref(),\n            &file_system_sandbox_policy,\n            network_sandbox_policy,\n            inner,\n            !no_proc,\n            allow_network_for_proxy,\n        );\n    }\n\n    // Legacy path: Landlock enforcement only, when bwrap sandboxing is not enabled.\n    if let Err(e) = apply_permission_profile_to_current_thread(\n        &permission_profile,\n        &sandbox_policy_cwd,\n        /*apply_landlock_fs*/ true,\n        allow_network_for_proxy,\n        /*proxy_routed_network*/ false,\n    ) {\n        panic!(\"error applying legacy Linux sandbox restrictions: {e:?}\");\n    }\n    exec_or_panic(command);\n}\n\n#[derive(Debug, Clone)]\nstruct EffectivePermissions {\n    permission_profile: PermissionProfile,\n    file_system_sandbox_policy: FileSystemSandboxPolicy,\n    network_sandbox_policy: NetworkSandboxPolicy,\n}\n\n#[derive(Debug, PartialEq, Eq)]\nenum ResolvePermissionProfileError {\n    MissingConfiguration,\n}\n\nimpl fmt::Display for ResolvePermissionProfileError {\n    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/linux-sandbox/src/linux_run_main.rs#L314-L350","documentation":"Error \"error applying legacy Linux sandbox restrictions: {e:?}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/linux-sandbox/src/linux_run_main.rs:332 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"}