zed-industries/zed · error · RpcError

Disconnected

Disconnected

Error message

Disconnected

What it means

Returned by open_buffer (and similar entry points) when the project is disconnected from its remote/server counterpart (is_disconnected). Any operation requiring the remote session, like opening a buffer, fails immediately with this sentinel.

Source

Thrown at crates/project/src/project.rs:3278

            let response = proto_client
                .request(proto::DownloadFileByPath {
                    project_id,
                    worktree_id: worktree_id.to_proto(),
                    path: path_str.clone(),
                    file_id,
                })
                .await?;

            log::debug!("download_file: got response, file_id={}", response.file_id);
            // The file_id is set from the State message, we just confirm the request succeeded
            Ok(())
        })
    }

    #[ztracing::instrument(skip_all)]
    pub fn open_buffer(
        &mut self,
        path: impl Into<ProjectPath>,
        cx: &mut App,
    ) -> Task<Result<Entity<Buffer>>> {
        if self.is_disconnected(cx) {
            return Task::ready(Err(anyhow!(ErrorCode::Disconnected)));
        }

        self.buffer_store.update(cx, |buffer_store, cx| {
            buffer_store.open_buffer(path.into(), cx)
        })
    }

    #[cfg(feature = "test-support")]
    pub fn open_buffer_with_lsp(
        &mut self,
        path: impl Into<ProjectPath>,
        cx: &mut Context<Self>,
    ) -> Task<Result<(Entity<Buffer>, lsp_store::OpenLspBufferHandle)>> {
        let buffer = self.open_buffer(path, cx);

View on GitHub (pinned to 9d272b0363)

Solutions

  1. Reconnect to the remote/collab session and retry opening the buffer
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/project/src/project.rs:3265 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/f1914c6c47954c68. Report an issue: GitHub.