{"record":{"id":"8b79b70faec0c041","repo":"openai/codex","slug":"helper-not-found-next-to-current-executable-or-und","errorCode":null,"errorMessage":"helper not found next to current executable or under {RESOURCES_DIRNAME}: {}","messagePattern":"helper not found next to current executable or under (.+?): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/helper_materialization.rs","lineNumber":187,"sourceCode":"}\n\nfn cached_helper_path(cache_key: &str) -> Option<PathBuf> {\n    let cache = HELPER_PATH_CACHE.get_or_init(|| Mutex::new(HashMap::new()));\n    let guard = cache.lock().ok()?;\n    guard.get(cache_key).cloned()\n}\n\nfn store_helper_path(cache_key: String, path: PathBuf) {\n    let cache = HELPER_PATH_CACHE.get_or_init(|| Mutex::new(HashMap::new()));\n    if let Ok(mut guard) = cache.lock() {\n        guard.insert(cache_key, path);\n    }\n}\n\nfn sibling_source_path(kind: HelperExecutable) -> Result<PathBuf> {\n    let exe = std::env::current_exe().context(\"resolve current executable for helper lookup\")?;\n    bundled_executable_path_for_exe(&exe, kind.file_name()).ok_or_else(|| {\n        anyhow!(\n            \"helper not found next to current executable or under {RESOURCES_DIRNAME}: {}\",\n            exe.display()\n        )\n    })\n}\n\npub(crate) fn bundled_executable_path_for_exe(exe: &Path, file_name: &str) -> Option<PathBuf> {\n    let find = |exe: &Path| {\n        let dir = exe.parent()?;\n        let direct_candidate = dir.join(file_name);\n        if direct_candidate.is_file() {\n            return Some(direct_candidate);\n        }\n\n        if dir.file_name() == Some(OsStr::new(BIN_DIRNAME))\n            && let Some(package_dir) = dir.parent()\n        {\n            let package_resource_candidate = package_dir.join(RESOURCES_DIRNAME).join(file_name);","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/helper_materialization.rs#L169-L205","documentation":"The sandbox helper executable (e.g., the elevated runner) was not found next to the current executable nor under the bundled resources directory, so there is no source from which to materialize the helper. The binary distribution is missing embedded helper files or was assembled incorrectly.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/helper_materialization.rs:187 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reinstall or rebuild the distribution so the helper exe ships next to the main binary or under the resources dir","In dev builds, ensure cargo/bazel placed the helper binary in the expected sibling location","Fall back to PATH lookup for the helper if bundling is unavailable"],"exampleFix":null,"handlingStrategy":"fallback","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"}