zed-industries/zed · error · anyhow::Error

Listing available agents is not supported in this…

Error message

Listing available agents is not supported in this environment

What it means

Returned by the default (unsupported-environment) implementation of the agent-thread listing method. It is a capability sentinel: environments that don't implement listing agents/models get a ready Task carrying this error instead of real data.

Solutions

  1. Hide the agent picker in UIs backed by this environment
  2. Only call the listing API on environments that implement it
  3. Implement the listing method in the concrete ThreadEnvironment to add support
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at crates/agent/src/thread.rs:797 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@916fc2b8cb (2026-08-20). Data as JSON: /api/errors/b84c06164f5bf58e. Report an issue: GitHub.

Appendix: source

Thrown at crates/agent/src/thread.rs:802

        cwd: Option<PathBuf>,
        output_byte_limit: Option<u64>,
        sandbox_wrap: Option<acp_thread::SandboxWrap>,
        cx: &mut AsyncApp,
    ) -> Task<Result<Rc<dyn TerminalHandle>>>;

    fn create_subagent(&self, label: String, cx: &mut App) -> Result<Rc<dyn SubagentHandle>>;

    fn resume_subagent(
        &self,
        _session_id: acp::SessionId,
        _cx: &mut App,
    ) -> Result<Rc<dyn SubagentHandle>> {
        Err(anyhow::anyhow!(
            "Resuming subagent sessions is not supported"
        ))
    }

    /// Creates an independent sibling thread visible in the agent sidebar.
    /// Unlike subagents, sibling threads are first-class threads that persist
    /// and run in parallel without reporting results back to the parent.
    fn create_sibling_thread(
        &self,
        request: SiblingThreadRequest,
        cx: &mut AsyncApp,
    ) -> Task<Result<SiblingThreadInfo>> {
        let _ = request;
        let _ = cx;
        Task::ready(Err(anyhow::anyhow!(
            "Creating sibling threads is not supported in this environment"
        )))
    }

    /// Lists the agents and models available for use with `create_sibling_thread`.
    fn list_available_agents(&self, cx: &mut App) -> Result<AvailableAgents> {
        let _ = cx;
        Err(anyhow::anyhow!(

View on GitHub (pinned to 916fc2b8cb)