{"record":{"id":"ffed1f81d534af4e","repo":"openai/codex","slug":"failed-to-resolve-current-executable-path-err","errorCode":null,"errorMessage":"failed to resolve current executable path: {err}","messagePattern":"failed to resolve current executable path: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/linux-sandbox/src/linux_run_main.rs","lineNumber":1525,"sourceCode":"    permission_profile: &'a PermissionProfile,\n    allow_network_for_proxy: bool,\n    proxy_route_spec: Option<String>,\n    command: Vec<String>,\n}\n\n/// Build the inner command that applies seccomp after bubblewrap.\nfn build_inner_seccomp_command(args: InnerSeccompCommandArgs<'_>) -> Vec<String> {\n    let InnerSeccompCommandArgs {\n        sandbox_policy_cwd,\n        command_cwd,\n        permission_profile,\n        allow_network_for_proxy,\n        proxy_route_spec,\n        command,\n    } = args;\n    let current_exe = match std::env::current_exe() {\n        Ok(path) => path,\n        Err(err) => panic!(\"failed to resolve current executable path: {err}\"),\n    };\n    let permission_profile_json = match serde_json::to_string(permission_profile) {\n        Ok(json) => json,\n        Err(err) => panic!(\"failed to serialize permission profile: {err}\"),\n    };\n\n    let mut inner = vec![\n        current_exe.to_string_lossy().to_string(),\n        \"--sandbox-policy-cwd\".to_string(),\n        sandbox_policy_cwd.to_string_lossy().to_string(),\n    ];\n    if let Some(command_cwd) = command_cwd {\n        inner.push(\"--command-cwd\".to_string());\n        inner.push(command_cwd.to_string_lossy().to_string());\n    }\n    inner.extend([\n        \"--permission-profile\".to_string(),\n        permission_profile_json,","sourceCodeStart":1507,"sourceCodeEnd":1543,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/linux-sandbox/src/linux_run_main.rs#L1507-L1543","documentation":"Resolving the path of the currently running executable failed while building the inner seccomp-stage command. This panic in build_inner_seccomp_command fires when std::env::current_exe() errors — /proc/self/exe unavailable or unreadable, or exotic launch environments — so the helper cannot re-exec itself inside the bubblewrap sandbox to apply seccomp.","triggerScenarios":"Thrown at codex-rs/linux-sandbox/src/linux_run_main.rs:1525 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify /proc is mounted and /proc/self/exe is readable inside the launch environment","Avoid launching the sandbox helper via mechanisms that obscure the exe path (deleted binaries, memfd)","Run the helper from a stable path on disk","Report as a bug with launch-environment details"],"exampleFix":null,"handlingStrategy":"validation","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"}