zed-industries/zed · error

remote worktree can't yet write files

Error message

remote worktree can't yet write files

What it means

Returned by Worktree::write_file when the worktree is the Remote variant. Writing files back to a remote worktree is not implemented yet, so the task fails immediately with this capability-gap sentinel.

Source

Thrown at crates/worktree/src/worktree.rs:958

            }
        }
    }

    pub fn write_file(
        &self,
        path: Arc<RelPath>,
        text: Rope,
        line_ending: LineEnding,
        encoding: &'static Encoding,
        has_bom: bool,
        cx: &Context<Worktree>,
    ) -> Task<Result<Arc<File>>> {
        match self {
            Worktree::Local(this) => {
                this.write_file(path, text, line_ending, encoding, has_bom, cx)
            }
            Worktree::Remote(_) => {
                Task::ready(Err(anyhow!("remote worktree can't yet write files")))
            }
        }
    }

    pub fn create_entry(
        &mut self,
        path: Arc<RelPath>,
        is_directory: bool,
        content: Option<Vec<u8>>,
        cx: &Context<Worktree>,
    ) -> Task<Result<CreatedEntry>> {
        let worktree_id = self.id();
        match self {
            Worktree::Local(this) => this.create_entry(path, is_directory, content, cx),
            Worktree::Remote(this) => {
                let project_id = this.project_id;
                let request = this.client.request(proto::CreateProjectEntry {
                    worktree_id: worktree_id.to_proto(),

View on GitHub (pinned to 9d272b0363)

Solutions

  1. Create/write the file in a local worktree instead
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/worktree/src/worktree.rs:952 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/561236dfbeb59c96. Report an issue: GitHub.