{"record":{"id":"97eec89ad8edbadf","repo":"zed-industries/zed","slug":"failed-to-send-tool-call-decision-prompt-error","errorCode":null,"errorMessage":"Failed to send tool call decision prompt: {error}","messagePattern":"Failed to send tool call decision prompt: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent/src/thread.rs","lineNumber":6519,"sourceCode":"            let (response_tx, response_rx) = oneshot::channel();\n            if let Err(error) =\n                stream\n                    .sender\n                    .unbounded_send(Ok(ThreadEvent::Elicitation(ElicitationRequest {\n                        tool_call_id,\n                        message,\n                        schema,\n                        response: response_tx,\n                    })))\n            {\n                log::error!(\"Failed to send elicitation request: {error}\");\n                return Err(anyhow!(\"Failed to send elicitation request: {error}\"));\n            }\n\n            response_rx\n                .await\n                .map_err(|_| anyhow!(\"elicitation channel closed\"))\n        })\n    }\n\n    /// Prompts the user for authorization.\n    ///\n    /// When `check_settings` is `Some`, this gate is settings-driven: the\n    /// settings are evaluated up-front (an Allow or Deny result resolves the\n    /// task immediately without prompting), and while a prompt is pending a\n    /// `SettingsStore` subscription watches for changes. A subsequent Allow\n    /// or Deny dismisses the prompt UI and resolves the task without user\n    /// interaction.\n    ///\n    /// When `check_settings` is `None`, the user is always prompted and\n    /// settings changes are ignored. This suits prompts that aren't\n    /// settings-driven (e.g. symlink-escape confirmations).\n    fn run_authorization_loop(\n        &self,\n        title: String,\n        options: acp_thread::PermissionOptions,","sourceCodeStart":6501,"sourceCodeEnd":6537,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/agent/src/thread.rs#L6501-L6537","documentation":"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.","triggerScenarios":"Thrown at crates/agent/src/thread.rs:6384 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The tool-call decision prompt could not be sent (stream closed); cancel the pending tool call","Retry the tool call if the thread/stream teardown was transient","Ensure the tool call surfaces as errored rather than waiting forever for a decision"],"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"}