{"record":{"id":"99310bdceb35e6d0","repo":"zed-industries/zed","slug":"failed-to-resolve-writable-path","errorCode":null,"errorMessage":"failed to resolve writable path `{}`{}","messagePattern":"failed to resolve writable path `(.+?)`(.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/sandbox/src/windows_wsl.rs","lineNumber":395,"sourceCode":"        .next()\n        .context(\"bug: missing resolved writable path\")?\n        .context(\"bug: required writable path resolved as missing\")?;\n    let (channel, version) = wsl_zed_release;\n    let helper = ensure_wsl_zed_helper(&wsl_exe, None, &channel, &version).await?;\n    let output = run_wsl_command(\n        &wsl_exe,\n        None,\n        [\n            \"--exec\",\n            helper.as_str(),\n            crate::WSL_SANDBOX_RESOLVE_FLAG,\n            translated.as_str(),\n        ],\n        \"resolve a sandbox write grant\",\n    )\n    .await?;\n    if !output.status.success() {\n        return Err(anyhow::anyhow!(\n            \"failed to resolve writable path `{}`{}\",\n            requested.display(),\n            command_failure_details(output.status.code(), &output.stderr)\n        ));\n    }\n    let stdout = String::from_utf8(output.stdout)\n        .context(\"WSL sandbox helper returned a non-UTF-8 canonical path\")?;\n    parse_canonical_grant_output(&stdout)\n}\n\n/// Strip the `\\\\?\\` verbatim prefix that `std::fs::canonicalize` prepends to a\n/// Windows drive path, leaving `\\\\?\\UNC\\...` untouched (it is not a drive path,\n/// and is rejected by the caller). We persist and display the plain `C:\\...`\n/// spelling so a non-junction grant compares equal to the requested path.\nfn strip_windows_verbatim_prefix(path: PathBuf) -> PathBuf {\n    let text = path.to_string_lossy();\n    match text.strip_prefix(r\"\\\\?\\\") {\n        Some(rest) if !rest.starts_with(\"UNC\\\\\") => PathBuf::from(rest),","sourceCodeStart":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/sandbox/src/windows_wsl.rs#L377-L413","documentation":"Resolving a writable path for the WSL sandbox failed: the WSL-side helper command to canonicalize the path exited non-zero (helper not provisioned, distro missing, or path invalid), so the grant cannot be resolved.","triggerScenarios":"Thrown at crates/sandbox/src/windows_wsl.rs:395 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure WSL is installed and the distro is running","Install curl inside the WSL distro so the helper can be provisioned","Check networking from WSL and retry"],"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"}