{"record":{"id":"8eb8609089fdcea6","repo":"zed-industries/zed","slug":"delete-sessions-not-supported","errorCode":null,"errorMessage":"delete_sessions not supported","messagePattern":"delete_sessions not supported","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/acp_thread/src/connection.rs","lineNumber":403,"sourceCode":"}\n\npub trait AgentSessionList {\n    fn list_sessions(\n        &self,\n        request: AgentSessionListRequest,\n        cx: &mut App,\n    ) -> Task<Result<AgentSessionListResponse>>;\n\n    fn supports_delete(&self) -> bool {\n        false\n    }\n\n    fn delete_session(&self, _session_id: &acp::SessionId, _cx: &mut App) -> Task<Result<()>> {\n        Task::ready(Err(anyhow::anyhow!(\"delete_session not supported\")))\n    }\n\n    fn delete_sessions(&self, _cx: &mut App) -> Task<Result<()>> {\n        Task::ready(Err(anyhow::anyhow!(\"delete_sessions not supported\")))\n    }\n\n    fn watch(&self, _cx: &mut App) -> Option<async_channel::Receiver<SessionListUpdate>> {\n        None\n    }\n\n    fn notify_refresh(&self) {}\n\n    fn into_any(self: Rc<Self>) -> Rc<dyn Any>;\n}\n\nimpl dyn AgentSessionList {\n    pub fn downcast<T: 'static + AgentSessionList + Sized>(self: Rc<Self>) -> Option<Rc<T>> {\n        self.into_any().downcast().ok()\n    }\n}\n\n#[derive(Debug)]","sourceCodeStart":385,"sourceCodeEnd":421,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/acp_thread/src/connection.rs#L385-L421","documentation":"Default trait-method error for AgentSessionList::delete_sessions (bulk delete). Like delete_session, the base implementation is a sentinel returning Err because the default supports_delete() is false; only agents implementing bulk deletion override it.","triggerScenarios":"Thrown at crates/acp_thread/src/connection.rs:403 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Gate bulk-delete UI/actions on supports_delete() returning true","Delete sessions individually via an overridden delete_session if the agent supports single deletes only","Implement delete_sessions in the concrete AgentSessionList to add support"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}