{"record":{"id":"b609794bfa9cb929","repo":"zed-industries/zed","slug":"no-worktree-for-path-project-path","errorCode":null,"errorMessage":"No worktree for path {project_path:?}","messagePattern":"No worktree for path (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/project/src/project.rs","lineNumber":2618,"sourceCode":"        let path = SanitizedPath::new(path).as_path();\n        let path_style = self.path_style(cx);\n        self.worktrees(cx)\n            .filter_map(|worktree| {\n                let worktree = worktree.read(cx);\n                let abs_path = worktree.abs_path();\n                let relative_path = path_style.strip_prefix(path, abs_path.as_ref())?;\n                let is_subpath =\n                    !relative_path.is_empty() && !worktree.is_path_ignored(&relative_path);\n                is_subpath.then(|| worktree.is_visible())\n            })\n            .max()\n    }\n\n    pub fn create_entry(\n        &mut self,\n        project_path: impl Into<ProjectPath>,\n        is_directory: bool,\n        cx: &mut Context<Self>,\n    ) -> Task<Result<CreatedEntry>> {\n        let project_path = project_path.into();\n        let Some(worktree) = self.worktree_for_id(project_path.worktree_id, cx) else {\n            return Task::ready(Err(anyhow!(format!(\n                \"No worktree for path {project_path:?}\"\n            ))));\n        };\n        worktree.update(cx, |worktree, cx| {\n            worktree.create_entry(project_path.path, is_directory, None, cx)\n        })\n    }\n\n    #[inline]\n    pub fn copy_entry(\n        &mut self,\n        entry_id: ProjectEntryId,\n        new_project_path: ProjectPath,\n        cx: &mut Context<Self>,","sourceCodeStart":2600,"sourceCodeEnd":2636,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/project/src/project.rs#L2600-L2636","documentation":"In Project::create_entry: the supplied ProjectPath references a worktree_id with no matching worktree in the WorktreeStore, so a new file/directory entry cannot be created. Indicates a stale or invalid project path.","triggerScenarios":"Thrown at crates/project/src/project.rs:2605 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the worktree containing the path is open and finished loading","Retry the creation after the project loads"],"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-14T00:17:10.932Z"}