{"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":"info","filePath":"crates/agent/src/thread.rs","lineNumber":6001,"sourceCode":"                        response: response_tx,\n                        context: None,\n                        kind: acp_thread::AuthorizationKind::PermissionGrant,\n                    },\n                )))\n            {\n                log::error!(\"Failed to send Windows-drive sandbox warning: {error}\");\n                return Err(anyhow!(\n                    \"Failed to send Windows-drive sandbox warning: {error}\"\n                ));\n            }\n\n            let outcome = response_rx\n                .await\n                .map_err(|_| anyhow!(\"authorization channel closed\"))?;\n            ensure_tool_call_authorization_not_interrupted(&outcome)?;\n            match acp_thread::SandboxPermission::from_id(outcome.option_id.0.as_ref()) {\n                Some(acp_thread::SandboxPermission::AllowOnce) => Ok(()),\n                _ => Err(anyhow!(\"Windows-drive write aborted by user\")),\n            }\n        })\n    }\n\n    fn sandbox_request_covered_by_grants(\n        request: &SandboxRequest,\n        sandbox_grants: &Rc<RefCell<ThreadSandboxGrants>>,\n        cx: &App,\n    ) -> bool {\n        let settings = AgentSettings::get_global(cx);\n        sandbox_grants\n            .borrow()\n            .covers_with_persistent(request, &settings.sandbox_permissions)\n    }\n\n    fn handle_sandbox_permission_outcome(\n        outcome: &acp_thread::SelectedPermissionOutcome,\n        request: &SandboxRequest,","sourceCodeStart":5983,"sourceCodeEnd":6019,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/agent/src/thread.rs#L5983-L6019","documentation":"After the Windows-drive warning, any outcome other than AllowOnce maps to this error, meaning the user declined the cross-drive write. This is deliberate refusal, not a malfunction: the sandbox will not perform the write and the tool call reports the abort.","triggerScenarios":"The user picks a non-AllowOnce outcome for a write outside the sandbox's project drive on Windows, declining the operation.","commonSituations":"Users declining unexpected absolute-path writes to another disk prompted by the sandbox; cautious responses to tool calls touching system drives.","solutions":["Inform the user the write was skipped; do not auto-retry","Re-issue the operation with a path inside the project drive if the user actually intended it","If the denial was accidental, let the user rerun the tool and approve it","Log it as a normal denial in the transcript, not as a failure"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match windows_drive_outcome {\n    Ok(()) => proceed_with_write(),\n    Err(err) if err.to_string() == \"Windows-drive write aborted by user\" => {\n        // Expected refusal: report and continue the turn.\n        report_to_user(\"Cross-drive write skipped by user\");\n    }\n    Err(err) => return Err(err),\n}","preventionTips":["Treat this as expected control flow, not a failure to fix","Avoid absolute paths on other drives in tool inputs unless the user asked for them","Do not auto-retry a user-aborted write; let the user re-initiate it","Log denials in the transcript for auditability"],"tags":["rust","agent","windows","sandbox","user-denial"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}