{"record":{"id":"561236dfbeb59c96","repo":"zed-industries/zed","slug":"remote-worktree-can-t-yet-write-files","errorCode":null,"errorMessage":"remote worktree can't yet write files","messagePattern":"remote worktree can't yet write files","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/worktree/src/worktree.rs","lineNumber":958,"sourceCode":"            }\n        }\n    }\n\n    pub fn write_file(\n        &self,\n        path: Arc<RelPath>,\n        text: Rope,\n        line_ending: LineEnding,\n        encoding: &'static Encoding,\n        has_bom: bool,\n        cx: &Context<Worktree>,\n    ) -> Task<Result<Arc<File>>> {\n        match self {\n            Worktree::Local(this) => {\n                this.write_file(path, text, line_ending, encoding, has_bom, cx)\n            }\n            Worktree::Remote(_) => {\n                Task::ready(Err(anyhow!(\"remote worktree can't yet write files\")))\n            }\n        }\n    }\n\n    pub fn create_entry(\n        &mut self,\n        path: Arc<RelPath>,\n        is_directory: bool,\n        content: Option<Vec<u8>>,\n        cx: &Context<Worktree>,\n    ) -> Task<Result<CreatedEntry>> {\n        let worktree_id = self.id();\n        match self {\n            Worktree::Local(this) => this.create_entry(path, is_directory, content, cx),\n            Worktree::Remote(this) => {\n                let project_id = this.project_id;\n                let request = this.client.request(proto::CreateProjectEntry {\n                    worktree_id: worktree_id.to_proto(),","sourceCodeStart":940,"sourceCodeEnd":976,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/worktree/src/worktree.rs#L940-L976","documentation":"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.","triggerScenarios":"Thrown at crates/worktree/src/worktree.rs:952 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create/write the file in a local worktree instead"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}