{"record":{"id":"723ead2c99b7f939","repo":"zed-industries/zed","slug":"creating-sibling-threads-is-not-supported-in-this","errorCode":null,"errorMessage":"Creating sibling threads is not supported in this environment","messagePattern":"Creating sibling threads is not supported in this environment","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent/src/thread.rs","lineNumber":789,"sourceCode":"        _session_id: acp::SessionId,\n        _cx: &mut App,\n    ) -> Result<Rc<dyn SubagentHandle>> {\n        Err(anyhow::anyhow!(\n            \"Resuming subagent sessions is not supported\"\n        ))\n    }\n\n    /// Creates an independent sibling thread visible in the agent sidebar.\n    /// Unlike subagents, sibling threads are first-class threads that persist\n    /// and run in parallel without reporting results back to the parent.\n    fn create_sibling_thread(\n        &self,\n        request: SiblingThreadRequest,\n        cx: &mut AsyncApp,\n    ) -> Task<Result<SiblingThreadInfo>> {\n        let _ = request;\n        let _ = cx;\n        Task::ready(Err(anyhow::anyhow!(\n            \"Creating sibling threads is not supported in this environment\"\n        )))\n    }\n\n    /// Lists the agents and models available for use with `create_sibling_thread`.\n    fn list_available_agents(&self, cx: &mut App) -> Result<AvailableAgents> {\n        let _ = cx;\n        Err(anyhow::anyhow!(\n            \"Listing available agents is not supported in this environment\"\n        ))\n    }\n}\n\n/// A request to create a new sibling thread.\n#[derive(Debug, Clone)]\npub struct SiblingThreadRequest {\n    /// A short title for the new thread, shown in the sidebar.\n    pub title: SharedString,","sourceCodeStart":771,"sourceCodeEnd":807,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/agent/src/thread.rs#L771-L807","documentation":"Default implementation of ThreadEnvironment::create_sibling_thread. Sibling threads are first-class sidebar threads; only environments wired to an agent panel (like NativeThreadEnvironment) support them, so the default returns this error.","triggerScenarios":"A tool calling create_sibling_thread on a ThreadEnvironment that did not override it — any embedded, test, or non-native environment.","commonSituations":"Agent code running outside the Zed workspace UI; prompt tooling that assumes sidebar delegation is always available.","solutions":["Run under NativeThreadEnvironment (with the agent panel initialized) when sibling threads are needed.","Implement create_sibling_thread in your ThreadEnvironment.","Fall back to a subagent, which reports results back to the parent and needs no host."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match environment.create_sibling_thread(request, cx).await {\n    Ok(info) => info,\n    Err(e) if e.to_string().contains(\"sibling threads is not supported\") => {\n        // fall back to a subagent that reports back to the parent\n        environment.create_subagent(label, cx)?\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Probe once at startup whether the environment supports sibling threads and cache the capability.","Default to subagents in portable agent code; sibling threads need a native host."],"tags":["rust","zed","agent","trait-default","sibling-thread","capability"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}