zed-industries/zed · error · std::io::Error
granting a not-yet-existing write directory is not supported
Error message
granting a not-yet-existing write directory is not supported on this platform
What it means
Sentinel validation error from the sandbox constructor for platforms other than Linux and macOS: eagerly granting write access to a directory that does not exist yet is only implemented for Linux and macOS. On any other target the Sandbox constructor rejects write paths that cannot be canonicalized ahead of time.
Source
Thrown at crates/sandbox/src/sandbox.rs:1377
let canonical_path = pinned_canonical_path(path)?;
Ok(Self {
canonical_path,
untrusted_raw_path,
eagerly_created,
})
}
#[cfg(target_os = "macos")]
{
Ok(Self {
canonical_path: canonicalize_allowing_missing_leaf(path),
untrusted_raw_path,
eagerly_created: Vec::new(),
})
}
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
{
let _ = untrusted_raw_path;
Err(std::io::Error::new(
std::io::ErrorKind::Unsupported,
"granting a not-yet-existing write directory is not supported on this platform",
))
}
}
/// The canonical, symlink-resolved path to show the user and record as the
/// grant.
pub fn canonical_path(&self) -> &Path {
&self.canonical_path
}
/// The path exactly as requested, for persisting alongside the canonical
/// path and for the "requested → granted" approval disclosure.
pub fn untrusted_raw_path(&self) -> &Path {
&self.untrusted_raw_path
}
View on GitHub (pinned to 5a9b9558db)
Solutions
- Create the write directory before passing it as a sandbox write grant
- Only grant directories that already exist when running on unsupported platforms
- Add platform support if this platform needs eager directory creation
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/sandbox/src/sandbox.rs:1377 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@5a9b9558db (2026-08-20).
Data as JSON: /api/errors/f3396b76b78bf9e0.
Report an issue: GitHub.