{"record":{"id":"743f61c5802c77a6","repo":"zed-industries/zed","slug":"session-not-found","errorCode":null,"errorMessage":"Session not found","messagePattern":"Session not found","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/agent/src/agent.rs","lineNumber":2191,"sourceCode":"                thread.push_acp_user_block(client_user_message_id, combined, path_style, cx);\n            });\n\n            let response_stream = thread.update(cx, |thread, cx| thread.send_existing(cx))?;\n\n            let connection = this.upgrade().map(NativeAgentConnection);\n            cx.update(|cx| {\n                NativeAgentConnection::handle_thread_events(\n                    response_stream,\n                    acp_thread.downgrade(),\n                    connection,\n                    cx,\n                )\n            })\n            .await\n        })\n    }\n}\n\n/// Wrapper struct that implements the AgentConnection trait\n#[derive(Clone)]\npub struct NativeAgentConnection(pub Entity<NativeAgent>);\n\nimpl NativeAgentConnection {\n    pub fn thread(&self, session_id: &acp::SessionId, cx: &App) -> Option<Entity<Thread>> {\n        self.0\n            .read(cx)\n            .sessions\n            .get(session_id)\n            .map(|session| session.thread.clone())\n    }\n\n    /// Forwards to [`NativeAgent::ensure_skills_scan_started`]. The\n    /// agent panel calls this from its three user-interaction trigger\n    /// points (input box focus, slash-autocomplete invocation, and\n    /// conversation submit) so that the skills directory is observed\n    /// only when the user is actually engaging with the panel.","sourceCodeStart":2173,"sourceCodeEnd":2209,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/agent/src/agent.rs#L2173-L2209","documentation":"Sentinel error returned by NativeAgentConnection::run_turn when the given acp::SessionId has no entry in the agent's sessions map, i.e. the turn was requested for an unknown, closed, or already-removed thread session.","triggerScenarios":"Thrown at crates/agent/src/agent.rs:2147 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the session id is current; re-list sessions or re-open the thread to obtain a valid id","Recreate the thread/session if it was closed externally (panel reload, workspace change)","Guard callers against reusing session ids captured before a restart"],"exampleFix":null,"handlingStrategy":"type-guard","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"}