{"record":{"id":"b4cdc507f93b759a","repo":"zed-industries/zed","slug":"failed-to-send-windows-drive-sandbox-warning-err","errorCode":null,"errorMessage":"Failed to send Windows-drive sandbox warning: {error}","messagePattern":"Failed to send Windows-drive sandbox warning: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent/src/thread.rs","lineNumber":6139,"sourceCode":"    fn handle_sandbox_permission_outcome(\n        outcome: &acp_thread::SelectedPermissionOutcome,\n        request: &SandboxRequest,\n        sandbox_grants: Rc<RefCell<ThreadSandboxGrants>>,\n        thread: Option<WeakEntity<Thread>>,\n        fs: Option<Arc<dyn Fs>>,\n        cx: &AsyncApp,\n    ) -> Result<()> {\n        debug_assert!(\n            outcome.params.is_none(),\n            \"unexpected params for sandbox permission\"\n        );\n\n        match acp_thread::SandboxPermission::from_id(outcome.option_id.0.as_ref()) {\n            Some(acp_thread::SandboxPermission::AllowOnce) => Ok(()),\n            Some(acp_thread::SandboxPermission::AllowThread) => {\n                sandbox_grants.borrow_mut().record(request);\n                Self::persist_thread_grants(&thread, cx);\n                Ok(())\n            }\n            Some(acp_thread::SandboxPermission::AllowAlways) => {\n                Self::persist_sandbox_always_permission(request, fs, cx);\n                Ok(())\n            }\n            Some(acp_thread::SandboxPermission::Deny) => {\n                Err(anyhow!(\"Permission to run tool denied by user\"))\n            }\n            None => {\n                let other = outcome.option_id.0.as_ref();\n                debug_assert!(false, \"unexpected sandbox permission option_id: {other}\");\n                Err(anyhow!(\"Permission to run tool denied by user\"))\n            }\n        }\n    }\n\n    fn persist_sandbox_always_permission(\n        request: &SandboxRequest,","sourceCodeStart":6121,"sourceCodeEnd":6157,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/agent/src/thread.rs#L6121-L6157","documentation":"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.","triggerScenarios":"Thrown at crates/agent/src/thread.rs:6006 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Sending the Windows-drive warning event failed because the event stream is closed; treat the write as aborted and stop the tool call","Retry in a live thread if the stream teardown was transient","Surface the failure to the user rather than silently proceeding with the write"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}