zed-industries/zed · error · anyhow::Error
cannot re-verify approved sandbox write grant
Error message
cannot re-verify approved sandbox write grant `{}` (if the directory was removed, remove the grant or recreate the directory) What it means
to_policy re-verifies each user-approved writable path grant by capturing it; a grant whose directory can no longer be captured (e.g. it was deleted) fails policy construction, telling the user to remove the grant or recreate the directory.
Solutions
- The user-approved writable grant path no longer exists on disk; either remove the stale grant from settings or recreate the directory at the granted path
- Re-approve the sandbox write permission to re-capture a fresh location
- Check whether the directory was deleted/moved after the grant was recorded
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/acp_thread/src/terminal.rs:288 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/527235e9a5c060e2.
Report an issue: GitHub.
Appendix: source
Thrown at crates/acp_thread/src/terminal.rs:288
sandbox::SandboxFsPolicy::Unrestricted { protected_paths }
} else {
// Project worktree paths are captured fresh; user-approved grants are
// rebuilt via the verifying reopen (or captured when legacy bare
// strings) through `granted_write_path_to_location`. A path that
// can't be captured fails the whole construction (never created).
let mut locations = Vec::new();
for path in &self.writable_paths {
let location = sandbox::HostFilesystemLocation::capture(path).map_err(|error| {
anyhow::anyhow!(error).context(format!(
"cannot capture writable sandbox path `{}`",
path.display()
))
})?;
locations.push(location);
}
for granted in &self.extra_write_paths {
let location = granted_write_path_to_location(granted).map_err(|error| {
anyhow::anyhow!(error).context(format!(
"cannot re-verify approved sandbox write grant `{}` (if the \
directory was removed, remove the grant or recreate the \
directory)",
granted.requested.display()
))
})?;
locations.push(location);
}
// Dedupe to a minimal cover on the captured canonical paths, so a
// grant nested under a worktree root (or another grant) is dropped
// rather than bound redundantly.
let writable_paths =
sandbox::normalize_host_filesystem_locations(locations.into_iter());
sandbox::SandboxFsPolicy::Restricted {
writable_paths,
protected_paths,
}
};View on GitHub (pinned to f4178619ac)