zed-industries/zed · error
expected {expected} result lines from the path resolution sc
Error message
expected {expected} result lines from the path resolution script, got {}: {stdout:?} What it means
Raised in parse_path_resolution_output(): the WSL path-resolution script returned a number of result lines different from the number of input paths, meaning the stdout protocol was corrupted; the actual stdout is embedded.
Source
Thrown at crates/sandbox/src/windows_wsl.rs:1140
args.extend(["L".to_string(), path.path.clone(), String::new()]);
}
PathMapping::NativeDrive {
windows_path,
fallback,
} => {
args.extend(["W".to_string(), windows_path.clone(), fallback.path.clone()]);
}
}
}
args
}
/// Parse [`PATH_RESOLUTION_SCRIPT`] output: one strictly-formatted line per
/// input triple. Anything else (wrong line count, unknown status words, a
/// non-absolute path) means the stdout protocol was corrupted and is an error.
fn parse_path_resolution_output(stdout: &str, expected: usize) -> Result<Vec<ResolvedPath>> {
let lines: Vec<&str> = stdout.lines().collect();
ensure!(
lines.len() == expected,
"expected {expected} result lines from the path resolution script, got {}: {stdout:?}",
lines.len()
);
lines
.into_iter()
.map(|line| {
let mut parts = line.splitn(3, ' ');
let (Some(translate), Some(exists), Some(path)) =
(parts.next(), parts.next(), parts.next())
else {
bail!("malformed line from the path resolution script: {line:?}");
};
let used_fallback = match translate {
"ok" => false,
"fallback" => true,
_ => bail!("malformed line from the path resolution script: {line:?}"),
};View on GitHub (pinned to f4178619ac)
Solutions
- Retry path resolution once in case of truncated pipe output
- Re-provision the sandbox helper if a stale script version prints a different protocol
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/sandbox/src/windows_wsl.rs:1140 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/f2a2b2bbea4c6989.
Report an issue: GitHub.