zed-industries/zed · error

Failed to send tool call decision prompt

Error message

Failed to send tool call decision prompt: {error}

What it means

Logged when the unbounded channel used to forward a ToolCallAuthorization event to the UI/consumer is closed, so the decision prompt (with the tool call fields and options) can never be answered. The send error {error} identifies the closed channel; the pending tool call fails as unanswerable.

Solutions

  1. The tool-call decision prompt could not be sent (stream closed); cancel the pending tool call
  2. Retry the tool call if the thread/stream teardown was transient
  3. Ensure the tool call surfaces as errored rather than waiting forever for a decision
Defensive patterns

Strategy: try-catch

When it happens

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

Appendix: source

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

            let (response_tx, response_rx) = oneshot::channel();
            if let Err(error) =
                stream
                    .sender
                    .unbounded_send(Ok(ThreadEvent::Elicitation(ElicitationRequest {
                        tool_call_id,
                        message,
                        schema,
                        response: response_tx,
                    })))
            {
                log::error!("Failed to send elicitation request: {error}");
                return Err(anyhow!("Failed to send elicitation request: {error}"));
            }

            response_rx
                .await
                .map_err(|_| anyhow!("elicitation channel closed"))
        })
    }

    /// Prompts the user for authorization.
    ///
    /// When `check_settings` is `Some`, this gate is settings-driven: the
    /// settings are evaluated up-front (an Allow or Deny result resolves the
    /// task immediately without prompting), and while a prompt is pending a
    /// `SettingsStore` subscription watches for changes. A subsequent Allow
    /// or Deny dismisses the prompt UI and resolves the task without user
    /// interaction.
    ///
    /// When `check_settings` is `None`, the user is always prompted and
    /// settings changes are ignored. This suits prompts that aren't
    /// settings-driven (e.g. symlink-escape confirmations).
    fn run_authorization_loop(
        &self,
        title: String,
        options: acp_thread::PermissionOptions,

View on GitHub (pinned to 916fc2b8cb)