{"record":{"id":"4a476961b1d17eb0","repo":"zed-industries/zed","slug":"no-worktree-for-entry-entry-id","errorCode":null,"errorMessage":"No worktree for entry {entry_id:?}","messagePattern":"No worktree for entry (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/project/src/project.rs","lineNumber":2655,"sourceCode":"    ) -> Task<Result<Option<Entry>>> {\n        self.worktree_store.update(cx, |worktree_store, cx| {\n            worktree_store.copy_entry(entry_id, new_project_path, cx)\n        })\n    }\n\n    /// Renames the project entry with given `entry_id`.\n    ///\n    /// `new_path` is a relative path to worktree root.\n    /// If root entry is renamed then its new root name is used instead.\n    pub fn rename_entry(\n        &mut self,\n        entry_id: ProjectEntryId,\n        new_path: ProjectPath,\n        cx: &mut Context<Self>,\n    ) -> Task<Result<CreatedEntry>> {\n        let worktree_store = self.worktree_store.clone();\n        let Some((worktree, old_path, is_dir)) = worktree_store\n            .read(cx)\n            .worktree_and_entry_for_id(entry_id, cx)\n            .map(|(worktree, entry)| (worktree, entry.path.clone(), entry.is_dir()))\n        else {\n            return Task::ready(Err(anyhow!(format!(\"No worktree for entry {entry_id:?}\"))));\n        };\n\n        let worktree_id = worktree.read(cx).id();\n        let is_root_entry = self.entry_is_worktree_root(entry_id, cx);\n\n        let lsp_store = self.lsp_store().downgrade();\n        cx.spawn(async move |project, cx| {\n            let (old_abs_path, new_abs_path) = {\n                let root_path = worktree.read_with(cx, |this, _| this.abs_path());\n                let new_abs_path = if is_root_entry {\n                    root_path\n                        .parent()\n                        .unwrap()\n                        .join(new_path.path.as_std_path())","sourceCodeStart":2637,"sourceCodeEnd":2673,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/project/src/project.rs#L2637-L2673","documentation":"In Project::rename_entry: worktree_and_entry_for_id found no worktree containing the given ProjectEntryId, so the entry cannot be renamed. The entry was likely deleted or its worktree closed before the rename ran.","triggerScenarios":"Thrown at crates/project/src/project.rs:2642 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Refresh the project panel and retry the rename","Verify the file still exists in an open worktree"],"exampleFix":null,"handlingStrategy":"type-guard","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-14T05:17:10.506Z"}