{"record":{"id":"23c2c842cff30def","repo":"zed-industries/zed","slug":"windows-drive-write-aborted-by-user","errorCode":null,"errorMessage":"Windows-drive write aborted by user","messagePattern":"Windows-drive write aborted by user","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent/src/thread.rs","lineNumber":6150,"sourceCode":"        );\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,\n        fs: Option<Arc<dyn Fs>>,\n        cx: &AsyncApp,\n    ) {\n        let Some(fs) = fs else {\n            log::error!(\n                \"Cannot persist \\\"allow always\\\" sandbox permission: no filesystem available\"\n            );\n            return;\n        };\n\n        let request = request.clone();","sourceCodeStart":6132,"sourceCodeEnd":6168,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/agent/src/thread.rs#L6132-L6168","documentation":"The user explicitly declined the Windows-drive write escalation prompt. This is a user-decision error, not a system fault: the sandboxed write outside allowed locations was refused, so the tool must stop the operation.","triggerScenarios":"Thrown at crates/agent/src/thread.rs:6017 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not retry the same write; the user declined it deliberately","Ask the user to adjust sandbox settings or grant access if the write is genuinely needed","Re-target the operation to an allowed (worktree/sandboxed) path"],"exampleFix":null,"handlingStrategy":"validation","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"}