zed-industries/zed · error
Failed to send tool call authorization
Error message
Failed to send tool call authorization: {error} What it means
Logged when the unbounded_send of a ToolCallAuthorization event (with title/options and a response channel) fails because the receiving end of the event stream is gone. The {error} details the channel failure; the authorization flow cannot proceed and the tool call is left unanswered.
Solutions
- The tool call authorization event could not be sent because the stream receiver is gone; cancel the pending authorization and fail the tool call
- Retry in a live thread if the teardown was transient
- Make sure the tool call is marked errored so it doesn't hang awaiting approval
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at crates/agent/src/thread.rs:6495 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/e60bfbfed03acd6c.
Report an issue: GitHub.
Appendix: source
Thrown at crates/agent/src/thread.rs:6631
loop {
let settings_changed = async {
if settings_rx.changed().await.is_err() {
std::future::pending::<()>().await;
}
};
futures::select_biased! {
outcome = (&mut response_rx).fuse() => {
let outcome = outcome.map_err(|_| anyhow!("authorization channel closed"))?;
ensure_tool_call_authorization_not_interrupted(&outcome)?;
return Self::persist_permission_outcome(&outcome, fs.clone(), cx);
}
_ = settings_changed.fuse() => {
// On auto-resolve, we dismiss the prompt UI by
// resolving the tool call's `WaitingForConfirmation`
// status with an internal selected outcome. Dropping
// `response_rx` prevents the synthetic response from
// being delivered back into this loop.
match cx.update(|cx| check_settings(cx)) {
ToolPermissionDecision::Allow => {
drop(response_rx);
stream.resolve_tool_call_authorization(
&tool_call_id,
auto_allow_outcome.clone(),
);
return Ok(());
}
ToolPermissionDecision::Deny(reason) => {
drop(response_rx);
stream.resolve_tool_call_authorization(
&tool_call_id,
auto_deny_outcome.clone(),
);
return Err(anyhow!(reason));
}
ToolPermissionDecision::Confirm => continue,
}View on GitHub (pinned to 916fc2b8cb)