zed-industries/zed · error · LoadError

Closing sessions is not supported by this agent.

Error message

Closing sessions is not supported by this agent.

What it means

Capability sentinel returned by close_session when the agent server's session_capabilities.close is None — the server did not advertise session closing support during initialization. The call short-circuits with a ready error task rather than sending an unsupported RPC; the faulting input is any close_session call against this server.

Source

Thrown at crates/agent_servers/src/acp.rs:1792

        session_id: acp::SessionId,
        project: Entity<Project>,
        work_dirs: PathList,
        title: Option<SharedString>,
        cx: &mut App,
    ) -> Task<Result<Entity<AcpThread>>> {
        if self
            .agent_capabilities
            .session_capabilities
            .resume
            .is_none()
        {
            return Task::ready(Err(anyhow!(LoadError::Other(
                "Resuming sessions is not supported by this agent.".into()
            ))));
        }

        let mcp_servers = mcp_servers_for_project(&project, cx);
        self.open_or_create_session(
            session_id,
            project,
            work_dirs,
            title,
            move |connection, session_id, directories| {
                Box::pin(async move {
                    let response = connection
                        .send_request(
                            directories
                                .into_resume_session_request(session_id.clone(), mcp_servers),
                        )
                        .block_task()
                        .await
                        .map_err(map_acp_error)?;
                    Ok(SessionConfigResponse {
                        modes: response.modes,
                        config_options: response.config_options,
                    })

View on GitHub (pinned to 9d272b0363)

Solutions

  1. Skip calling close_session when supports_close_session() is false
  2. Let the session be cleaned up by disconnecting from the agent server
  3. Use an agent that advertises close capability
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/agent_servers/src/acp.rs:1823 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-08-20). Data as JSON: /api/errors/4f72748f29d185fd. Report an issue: GitHub.