zed-industries/zed · error
WSL sandbox helper returned invalid canonical-path output: {
Error message
WSL sandbox helper returned invalid canonical-path output: {stdout:?} What it means
The WSL sandbox helper's stdout protocol was violated: the filesystem-class line contained an unrecognized token instead of the expected windows/native marker. The helper binary is mismatched with this version of Zed or its output was corrupted.
Source
Thrown at crates/sandbox/src/windows_wsl.rs:628
}
fn parse_canonical_grant_output(stdout: &str) -> Result<ResolvedGrant> {
let mut lines = stdout.lines();
let distro = lines
.next()
.context("WSL sandbox helper omitted the distro name")?;
let canonical = lines
.next()
.context("WSL sandbox helper omitted the canonical path")?;
let fs_class = lines
.next()
.context("WSL sandbox helper omitted the filesystem class")?;
let on_windows_fs = match fs_class {
RESOLVE_WINDOWS_FS => true,
RESOLVE_NATIVE_FS => false,
_ => bail!("WSL sandbox helper returned an invalid filesystem class: {fs_class:?}"),
};
ensure!(
lines.next().is_none()
&& !distro.is_empty()
&& !distro.contains(['/', '\\'])
&& canonical.starts_with('/'),
"WSL sandbox helper returned invalid canonical-path output: {stdout:?}"
);
// Store the canonical as the Linux path bwrap actually binds. The distro is
// pinned at enforcement from the *requested* path (see `wrap_invocation`),
// so it is not re-encoded here: spelling the canonical as
// `\\wsl.localhost\<distro>\...` would resurface the Windows-style path we
// avoid and, because it names the same object as the request, show as a
// spurious redirect in the approval UI.
Ok(ResolvedGrant {
canonical: PathBuf::from(canonical),
on_windows_fs,
})
}
View on GitHub (pinned to f4178619ac)
Solutions
- Re-provision the WSL sandbox helper so a version-matched helper is installed
- Check that a stale Zed helper installed via ZED_WSL_SANDBOX_HELPER is not being reused
- Retry once in case of corrupted pipe output
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/sandbox/src/windows_wsl.rs:628 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/6d65f3ab3731173c.
Report an issue: GitHub.