{"record":{"id":"9a0c08356716ccfb","repo":"zed-industries/zed","slug":"the-wsl-zed-sandbox-helper-resolved-to-path","errorCode":null,"errorMessage":"the WSL `zed` sandbox helper resolved to {path:?} rather than an absolute path","messagePattern":"the WSL `zed` sandbox helper resolved to (.+?) rather than an absolute path","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/sandbox/src/windows_wsl.rs","lineNumber":937,"sourceCode":"            } else {\n                format!(\": {stderr}\")\n            }\n        )));\n    }\n\n    let stdout = String::from_utf8_lossy(&output.stdout);\n    let path = stdout\n        .lines()\n        .rev()\n        .find_map(|line| line.strip_prefix(HELPER_RESULT_PREFIX))\n        .map(|path| path.trim().to_string())\n        .with_context(|| {\n            unavailable(format!(\n                \"no helper result line in sandbox-helper provisioning output from {}: {stdout:?}\",\n                wsl_distro_label(distro)\n            ))\n        })?;\n    ensure!(\n        path.starts_with('/'),\n        \"the WSL `zed` sandbox helper resolved to {path:?} rather than an absolute path\"\n    );\n\n    cache\n        .lock()\n        .unwrap_or_else(|poisoned| poisoned.into_inner())\n        .insert(key, path.clone());\n    Ok(path)\n}\n\n/// Shell script that resolves and existence-checks paths in a single WSL\n/// round-trip. Arguments come in triples `(kind, path, fallback)`: kind `W`\n/// is a native Windows path to translate with `wslpath -u` (falling back to\n/// the precomputed `/mnt/<drive>/...` mapping when translation fails), kind\n/// `L` is an already-Linux path with an empty fallback. One result line is\n/// printed per triple: `<ok|fallback> <ok|missing> <resolved path>`.\nconst PATH_RESOLUTION_SCRIPT: &str = \"\\","sourceCodeStart":919,"sourceCodeEnd":955,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/sandbox/src/windows_wsl.rs#L919-L955","documentation":"The provisioning script reported success but the helper result line contained a non-absolute path, violating the result protocol. The helper resolution output is malformed, likely due to a mismatched or damaged install.","triggerScenarios":"Thrown at crates/sandbox/src/windows_wsl.rs:937 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run provisioning (failures are not cached) so the helper is re-downloaded and installed","Clear the off-PATH install location if it contains a broken helper","Verify the script's HELPER_RESULT_PREFIX line format matches this Zed version"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}