zed-industries/zed · error

Failed to send Windows-drive sandbox warning

Error message

Failed to send Windows-drive sandbox warning: {error}

What it means

Sending the Windows-drive write warning authorization over the event stream failed; the error is interpolated and the tool call aborts because the user cannot be warned about the out-of-sandbox drive write.

Solutions

  1. Sending the Windows-drive warning event failed because the event stream is closed; treat the write as aborted and stop the tool call
  2. Retry in a live thread if the stream teardown was transient
  3. Surface the failure to the user rather than silently proceeding with the write
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at crates/agent/src/thread.rs:6006 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/b4cdc507f93b759a. Report an issue: GitHub.

Appendix: source

Thrown at crates/agent/src/thread.rs:6139

    fn handle_sandbox_permission_outcome(
        outcome: &acp_thread::SelectedPermissionOutcome,
        request: &SandboxRequest,
        sandbox_grants: Rc<RefCell<ThreadSandboxGrants>>,
        thread: Option<WeakEntity<Thread>>,
        fs: Option<Arc<dyn Fs>>,
        cx: &AsyncApp,
    ) -> Result<()> {
        debug_assert!(
            outcome.params.is_none(),
            "unexpected params for sandbox permission"
        );

        match acp_thread::SandboxPermission::from_id(outcome.option_id.0.as_ref()) {
            Some(acp_thread::SandboxPermission::AllowOnce) => Ok(()),
            Some(acp_thread::SandboxPermission::AllowThread) => {
                sandbox_grants.borrow_mut().record(request);
                Self::persist_thread_grants(&thread, cx);
                Ok(())
            }
            Some(acp_thread::SandboxPermission::AllowAlways) => {
                Self::persist_sandbox_always_permission(request, fs, cx);
                Ok(())
            }
            Some(acp_thread::SandboxPermission::Deny) => {
                Err(anyhow!("Permission to run tool denied by user"))
            }
            None => {
                let other = outcome.option_id.0.as_ref();
                debug_assert!(false, "unexpected sandbox permission option_id: {other}");
                Err(anyhow!("Permission to run tool denied by user"))
            }
        }
    }

    fn persist_sandbox_always_permission(
        request: &SandboxRequest,

View on GitHub (pinned to 916fc2b8cb)