{"record":{"id":"204fabdf4c179b28","repo":"zed-industries/zed","slug":"delete-session-not-supported","errorCode":null,"errorMessage":"delete_session not supported","messagePattern":"delete_session not supported","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/acp_thread/src/connection.rs","lineNumber":399,"sourceCode":"    SessionInfo {\n        session_id: acp::SessionId,\n        update: acp::SessionInfoUpdate,\n    },\n}\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()","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/acp_thread/src/connection.rs#L381-L417","documentation":"Default trait-method error for AgentSessionList::delete_session. The base implementation advertises supports_delete() == false; any caller that ignores that check hits this sentinel. Agents that do support deletion override the method.","triggerScenarios":"Thrown at crates/acp_thread/src/connection.rs:399 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check supports_delete() before offering or invoking delete_session","Use an agent/connection implementation that actually implements session deletion","Hide or disable delete controls in the UI when the trait reports deletion is unsupported"],"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"}