zed-industries/zed · error · anyhow::Error
failed to resolve writable path `{}`{}
Error message
failed to resolve writable path `{}`{} What it means
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.
Source
Thrown at crates/sandbox/src/windows_wsl.rs:395
.next()
.context("bug: missing resolved writable path")?
.context("bug: required writable path resolved as missing")?;
let (channel, version) = wsl_zed_release;
let helper = ensure_wsl_zed_helper(&wsl_exe, None, &channel, &version).await?;
let output = run_wsl_command(
&wsl_exe,
None,
[
"--exec",
helper.as_str(),
crate::WSL_SANDBOX_RESOLVE_FLAG,
translated.as_str(),
],
"resolve a sandbox write grant",
)
.await?;
if !output.status.success() {
return Err(anyhow::anyhow!(
"failed to resolve writable path `{}`{}",
requested.display(),
command_failure_details(output.status.code(), &output.stderr)
));
}
let stdout = String::from_utf8(output.stdout)
.context("WSL sandbox helper returned a non-UTF-8 canonical path")?;
parse_canonical_grant_output(&stdout)
}
/// Strip the `\\?\` verbatim prefix that `std::fs::canonicalize` prepends to a
/// Windows drive path, leaving `\\?\UNC\...` untouched (it is not a drive path,
/// and is rejected by the caller). We persist and display the plain `C:\...`
/// spelling so a non-junction grant compares equal to the requested path.
fn strip_windows_verbatim_prefix(path: PathBuf) -> PathBuf {
let text = path.to_string_lossy();
match text.strip_prefix(r"\\?\") {
Some(rest) if !rest.starts_with("UNC\\") => PathBuf::from(rest),View on GitHub (pinned to f4178619ac)
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
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/sandbox/src/windows_wsl.rs:395 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/99310bdceb35e6d0.
Report an issue: GitHub.