{"record":{"id":"99b2b7b7f3d63d41","repo":"zed-industries/zed","slug":"no-sibling-thread-host-is-registered-this-usually","errorCode":null,"errorMessage":"No sibling-thread host is registered. This usually means the agent panel hasn't been initialized in this workspace.","messagePattern":"No sibling-thread host is registered\\. This usually means the agent panel hasn't been initialized in this workspace\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent/src/agent.rs","lineNumber":3266,"sourceCode":"        &self,\n        session_id: acp::SessionId,\n        cx: &mut App,\n    ) -> Result<Rc<dyn SubagentHandle>> {\n        self.resume_subagent_thread(session_id, cx)\n    }\n\n    fn create_sibling_thread(\n        &self,\n        request: SiblingThreadRequest,\n        cx: &mut AsyncApp,\n    ) -> Task<Result<SiblingThreadInfo>> {\n        let host = match self\n            .agent\n            .read_with(cx, |agent, _| agent.sibling_thread_host())\n        {\n            Ok(Some(host)) => host,\n            Ok(None) => {\n                return Task::ready(Err(anyhow!(\n                    \"No sibling-thread host is registered. This usually means the \\\n                     agent panel hasn't been initialized in this workspace.\"\n                )));\n            }\n            Err(err) => return Task::ready(Err(err)),\n        };\n        host.create_sibling_thread(request, cx)\n    }\n\n    fn list_available_agents(&self, cx: &mut App) -> Result<AvailableAgents> {\n        let host = self\n            .agent\n            .read_with(cx, |agent, _| agent.sibling_thread_host())?\n            .ok_or_else(|| {\n                anyhow!(\n                    \"No sibling-thread host is registered. This usually means the \\\n                     agent panel hasn't been initialized in this workspace.\"\n                )","sourceCodeStart":3248,"sourceCodeEnd":3284,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/agent/src/agent.rs#L3248-L3284","documentation":"create_sibling_thread requires a SiblingThreadHost registered on the NativeAgent (agent.sibling_thread_host()); the host is supplied by the agent panel. If the panel has not been initialized in this workspace, no host exists and the request cannot be served.","triggerScenarios":"A tool attempting to create a sibling thread where the agent panel never initialized: headless or embedded use of the agent crate, a workspace without the panel loaded, or a call made before registration.","commonSituations":"Running the agent crate in tests or headless harnesses; invoking sibling-thread tools from embedded hosts; panel closed or not yet constructed.","solutions":["Initialize the agent panel in the workspace before sibling-thread tools become available.","In embedded/test contexts, register a SiblingThreadHost implementation on the NativeAgent.","Fall back to a regular subagent when no host is registered."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// inside the app: check host registration before offering the capability\nlet host_registered = agent.read(cx).sibling_thread_host().is_some();","typeGuard":"fn sibling_threads_available(agent: &Entity<NativeAgent>, cx: &App) -> bool {\n    agent.read(cx).sibling_thread_host().is_some()\n}","tryCatchPattern":"match env.create_sibling_thread(request, cx).await {\n    Ok(info) => info,\n    Err(e) if e.to_string().contains(\"sibling-thread host\") => {\n        // no panel host: fall back to a subagent\n        env.create_subagent_thread(title, cx)?\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Initialize the agent panel in workspaces that expose sibling-thread tools.","In embedded hosts, register a SiblingThreadHost implementation."],"tags":["rust","zed","agent","sibling-thread","agent-panel","registration"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}