zed-industries/zed · error

Failed to send sandbox fallback authorization

Error message

Failed to send sandbox fallback authorization: {error}

What it means

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.

Solutions

  1. The sandbox-fallback authorization event could not be delivered because the event stream receiver is gone; abort the tool call
  2. Retry the tool call in a live thread if cancellation was transient
  3. Do not run the command unsandboxed without an explicit user approval being delivered
Defensive patterns

Strategy: try-catch

When it happens

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

Appendix: source

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

                    Ok(SandboxFallbackDecision::RunUnsandboxed)
                }
                Some(acp_thread::SandboxPermission::Deny) => Ok(SandboxFallbackDecision::Deny),
                None => {
                    let other = option_id;
                    debug_assert!(false, "unexpected sandbox fallback option_id: {other}");
                    Ok(SandboxFallbackDecision::Deny)
                }
            }
        })
    }

    /// Persist the `allow_unsandboxed` setting. Going forward this turns
    /// sandboxing off for the model-facing surface: later turns expose the
    /// plain `terminal` tool (with no sandbox prompt section) and commands run
    /// without an OS sandbox. On Windows, WSL sandbox setup is skipped.
    #[cfg(any(target_os = "linux", target_os = "windows"))]
    fn persist_sandbox_unsandboxed_permission(fs: Option<Arc<dyn Fs>>, cx: &AsyncApp) {
        let Some(fs) = fs else {
            log::error!(
                "Cannot persist \"allow always\" unsandboxed permission: no filesystem available"
            );
            return;
        };
        cx.update(|cx| {
            update_settings_file(fs, cx, move |settings, _| {
                settings
                    .agent
                    .get_or_insert_default()
                    .allow_sandbox_unsandboxed();
            });
        });
    }

    /// Prompts the user to choose between an explicit set of actions and
    /// returns the chosen `option_id`.
    ///

View on GitHub (pinned to 916fc2b8cb)