{"record":{"id":"fb779b8dd7ed5840","repo":"zed-industries/zed","slug":"failed-to-send-sandbox-fallback-authorization-er","errorCode":null,"errorMessage":"Failed to send sandbox fallback authorization: {error}","messagePattern":"Failed to send sandbox fallback authorization: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent/src/thread.rs","lineNumber":6416,"sourceCode":"                    Ok(SandboxFallbackDecision::RunUnsandboxed)\n                }\n                Some(acp_thread::SandboxPermission::Deny) => Ok(SandboxFallbackDecision::Deny),\n                None => {\n                    let other = option_id;\n                    debug_assert!(false, \"unexpected sandbox fallback option_id: {other}\");\n                    Ok(SandboxFallbackDecision::Deny)\n                }\n            }\n        })\n    }\n\n    /// Persist the `allow_unsandboxed` setting. Going forward this turns\n    /// sandboxing off for the model-facing surface: later turns expose the\n    /// plain `terminal` tool (with no sandbox prompt section) and commands run\n    /// without an OS sandbox. On Windows, WSL sandbox setup is skipped.\n    #[cfg(any(target_os = \"linux\", target_os = \"windows\"))]\n    fn persist_sandbox_unsandboxed_permission(fs: Option<Arc<dyn Fs>>, cx: &AsyncApp) {\n        let Some(fs) = fs else {\n            log::error!(\n                \"Cannot persist \\\"allow always\\\" unsandboxed permission: no filesystem available\"\n            );\n            return;\n        };\n        cx.update(|cx| {\n            update_settings_file(fs, cx, move |settings, _| {\n                settings\n                    .agent\n                    .get_or_insert_default()\n                    .allow_sandbox_unsandboxed();\n            });\n        });\n    }\n\n    /// Prompts the user to choose between an explicit set of actions and\n    /// returns the chosen `option_id`.\n    ///","sourceCodeStart":6398,"sourceCodeEnd":6434,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/agent/src/thread.rs#L6398-L6434","documentation":"Sending the sandbox fallback authorization (run unsandboxed after sandbox failure) over the event stream failed, so the fallback prompt cannot be shown and the tool call fails with the interpolated send error.","triggerScenarios":"Thrown at crates/agent/src/thread.rs:6282 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The sandbox-fallback authorization event could not be delivered because the event stream receiver is gone; abort the tool call","Retry the tool call in a live thread if cancellation was transient","Do not run the command unsandboxed without an explicit user approval being delivered"],"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"}