zed-industries/zed · error · anyhow::Error
delete_session not supported
Error message
delete_session not supported
What it means
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.
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
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at crates/acp_thread/src/connection.rs:399 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/204fabdf4c179b28.
Report an issue: GitHub.
Appendix: source
Thrown at crates/acp_thread/src/connection.rs:399
SessionInfo {
session_id: acp::SessionId,
update: acp::SessionInfoUpdate,
},
}
pub trait AgentSessionList {
fn list_sessions(
&self,
request: AgentSessionListRequest,
cx: &mut App,
) -> Task<Result<AgentSessionListResponse>>;
fn supports_delete(&self) -> bool {
false
}
fn delete_session(&self, _session_id: &acp::SessionId, _cx: &mut App) -> Task<Result<()>> {
Task::ready(Err(anyhow::anyhow!("delete_session not supported")))
}
fn delete_sessions(&self, _cx: &mut App) -> Task<Result<()>> {
Task::ready(Err(anyhow::anyhow!("delete_sessions not supported")))
}
fn watch(&self, _cx: &mut App) -> Option<async_channel::Receiver<SessionListUpdate>> {
None
}
fn notify_refresh(&self) {}
fn into_any(self: Rc<Self>) -> Rc<dyn Any>;
}
impl dyn AgentSessionList {
pub fn downcast<T: 'static + AgentSessionList + Sized>(self: Rc<Self>) -> Option<Rc<T>> {
self.into_any().downcast().ok()View on GitHub (pinned to f4178619ac)