{"record":{"id":"2d56c511563145c8","repo":"zed-industries/zed","slug":"closing-sessions-are-not-supported-by-this-agent","errorCode":null,"errorMessage":"Closing sessions are not supported by this agent.","messagePattern":"Closing sessions are not supported by this agent\\.","errorType":"exception","errorClass":"LoadError","httpStatus":null,"severity":"error","filePath":"crates/agent_servers/src/acp.rs","lineNumber":1823,"sourceCode":"                        config_options: response.config_options,\n                    })\n                })\n            },\n            cx,\n        )\n    }\n\n    fn supports_close_session(&self) -> bool {\n        self.agent_capabilities.session_capabilities.close.is_some()\n    }\n\n    fn close_session(\n        self: Rc<Self>,\n        session_id: &acp::SessionId,\n        cx: &mut App,\n    ) -> Task<Result<()>> {\n        if !self.supports_close_session() {\n            return Task::ready(Err(anyhow!(LoadError::Other(\n                \"Closing sessions is not supported by this agent.\".into()\n            ))));\n        }\n\n        // If a load is still in flight, decrement its ref count. The pending\n        // entry is the source of truth for how many handles exist during a\n        // load, so we must tick it down here as well as the `sessions` entry\n        // that was pre-registered to receive history-replay notifications.\n        // Only once the pending ref count hits zero do we actually close the\n        // session; the load task will observe the missing sessions entry and\n        // fail with \"session was closed before load completed\".\n        let pending_ref_count = {\n            let mut pending_sessions = self.pending_sessions.borrow_mut();\n            pending_sessions.get_mut(session_id).map(|pending| {\n                pending.ref_count = pending.ref_count.saturating_sub(1);\n                pending.ref_count\n            })\n        };","sourceCodeStart":1805,"sourceCodeEnd":1841,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/agent_servers/src/acp.rs#L1805-L1841","documentation":"Error \"Closing sessions are not supported by this agent.\" thrown in zed-industries/zed.","triggerScenarios":"Thrown at crates/agent_servers/src/acp.rs:1823 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}