{"record":{"id":"b84c06164f5bf58e","repo":"zed-industries/zed","slug":"listing-available-agents-is-not-supported-in-this","errorCode":null,"errorMessage":"Listing available agents is not supported in this environment","messagePattern":"Listing available agents is not supported in this environment","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent/src/thread.rs","lineNumber":797,"sourceCode":"    /// 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,\n    /// The initial prompt to send to the new thread.\n    pub prompt: String,\n    /// Optional agent ID to use. Defaults to the native Zed agent.\n    pub agent_id: Option<String>,\n    /// Optional model override, as `provider/model-id`.\n    /// Defaults to the user's configured default model for the agent.\n    pub model: Option<String>,\n    /// Whether to create the thread in a new git worktree workspace.","sourceCodeStart":779,"sourceCodeEnd":815,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/agent/src/thread.rs#L779-L815","documentation":"Default implementation of ThreadEnvironment::list_available_agents, the companion to create_sibling_thread. Without an environment that supports sibling threads there is no agent/model catalog to list, so the default returns this error.","triggerScenarios":"Calling list_available_agents on a ThreadEnvironment that did not override it — embedded or test environments without an agent panel host.","commonSituations":"Delegation pickers probing capabilities in non-native hosts; tests exercising the trait surface.","solutions":["Use NativeThreadEnvironment with the agent panel initialized when you need the catalog.","Override list_available_agents in your ThreadEnvironment.","Treat the error as 'feature unavailable' and offer subagent delegation instead."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match environment.list_available_agents(cx) {\n    Ok(agents) => agents,\n    Err(e) if e.to_string().contains(\"Listing available agents is not supported\") => {\n        AvailableAgents::default() // empty catalog; disable sibling-thread pickers\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Cache a capability flag per environment instead of probing on every render.","Hide delegation pickers when the catalog is unavailable."],"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"}