zed-industries/zed · error
Permission to run tool denied by user
Error message
Permission to run tool denied by user
What it means
Returned from the sandbox permission outcome handler when the user's decision maps to a denial (anything other than AllowOnce/AllowThread/AllowAlways). It is the standard refusal sentinel propagated back to the ACP client indicating the tool run was rejected by the user.
Solutions
- The user denied permission for the tool call in the authorization prompt; the tool must not run
- Re-prompt only if the user later changes their mind or the context changes significantly
- Continue the turn without that tool, letting the model adapt to the denial
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/agent/src/thread.rs:6058 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@916fc2b8cb (2026-08-20).
Data as JSON: /api/errors/eaafbf4377c51bf3.
Report an issue: GitHub.
Appendix: source
Thrown at crates/agent/src/thread.rs:6191
crate::sandboxing::NetworkRequest::None => {}
crate::sandboxing::NetworkRequest::AnyHost => {
agent.allow_sandbox_all_hosts();
}
crate::sandboxing::NetworkRequest::Hosts(hosts) => {
// Rebuild the persisted list with subsumption pruning
// so granting `*.github.com` retires a previously
// persisted `api.github.com` instead of accumulating
// redundant entries. Unparsable hand-edited entries
// are preserved untouched.
let mut patterns = Vec::new();
let mut unparsable = Vec::new();
for raw in agent.sandbox_network_hosts() {
match http_proxy::HostPattern::parse(raw) {
Ok(pattern) => {
crate::sandboxing::insert_host_pattern(&mut patterns, pattern)
}
Err(_) => unparsable.push(raw.clone()),
}
}
for host in hosts {
crate::sandboxing::insert_host_pattern(&mut patterns, host.clone());
}
let mut host_strings = unparsable;
host_strings.extend(patterns.iter().map(|pattern| pattern.to_string()));
agent.set_sandbox_network_hosts(host_strings);
}
}
if request.allow_fs_write_all {
agent.allow_sandbox_fs_write_all();
}
if request.unsandboxed {
agent.allow_sandbox_unsandboxed();
}
for granted in request.write_paths {
// Persist the full (requested, resolved-canonical) pair so aView on GitHub (pinned to 916fc2b8cb)