zed-industries/zed · error

Failed to send sandbox authorization

Error message

Failed to send sandbox authorization: {error}

What it means

While setting up a sandboxed terminal tool call, sending the ToolCallAuthorization event (sandbox permission prompt) over the event stream failed; the send error is interpolated, so authorization cannot proceed.

Solutions

  1. The unbounded_send of the ToolCallAuthorization event failed because the event stream receiver is gone (thread/cancelled); abort the pending tool call
  2. Retry the tool call in a live thread if the stream was dropped due to a transient teardown
  3. Log and surface the error to the user instead of blocking on an authorization that can never arrive
Defensive patterns

Strategy: try-catch

When it happens

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

Appendix: source

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

                        );
                    }
                    _ = settings_changed.fuse() => {
                        if cx.update(|cx| Self::sandbox_request_covered_by_grants(
                            &request,
                            &sandbox_grants,
                            cx,
                        )) {
                            drop(response_rx);
                            stream.resolve_tool_call_authorization(
                                &tool_call_id,
                                auto_allow_outcome.clone(),
                            );
                            return Ok(());
                        }
                    }
                }
            }
        })
    }

    /// Confirm, before running a command whose sandbox will contain a Windows
    /// drive (DrvFs) path, that the user accepts the weaker integrity
    /// guarantees. This is a transient gate *in front of* the normal sandbox
    /// flow — it is never persisted or recorded as a grant; the only way to
    /// stop it recurring is to disable `warn_ntfs_grants` in settings (offered
    /// via the banner's gear). Returns `Ok(())` on "Continue" (after which the
    /// caller proceeds to any escalation prompt) and `Err` on "Abort".
    pub(crate) fn authorize_windows_fs_warning(&self, cx: &mut App) -> Task<Result<()>> {
        // If the warning is already disabled, don't prompt.
        if !AgentSettings::get_global(cx)
            .sandbox_permissions
            .warn_ntfs_grants
        {
            return Task::ready(Ok(()));
        }

View on GitHub (pinned to 916fc2b8cb)