{"record":{"id":"567e5469ac95d9fe","repo":"zed-industries/zed","slug":"project-entry-not-found","errorCode":null,"errorMessage":"project entry not found","messagePattern":"project entry not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent_ui/src/mention_set.rs","lineNumber":1255,"sourceCode":"                        .to_string_lossy()\n                        .to_string(),\n                ));\n            }\n        }\n\n        files\n    }\n\n    let Some(project_path) = project\n        .read(cx)\n        .project_path_for_absolute_path(&abs_path, cx)\n    else {\n        return Task::ready(Err(anyhow!(\n            \"project path not found for directory mention {abs_path:?}\"\n        )));\n    };\n    let Some(entry) = project.read(cx).entry_for_path(&project_path, cx) else {\n        return Task::ready(Err(anyhow!(\"project entry not found\")));\n    };\n    let directory_path = entry.path.clone();\n    let worktree_id = project_path.worktree_id;\n    let Some(worktree) = project.read(cx).worktree_for_id(worktree_id, cx) else {\n        return Task::ready(Err(anyhow!(\"worktree not found\")));\n    };\n    let project = project.clone();\n    cx.spawn(async move |cx| {\n        let file_paths = worktree.read_with(cx, |worktree, _cx| {\n            collect_files_in_path(worktree, &directory_path)\n        });\n        let descendants_future = cx.update(|cx| {\n            futures::future::join_all(file_paths.into_iter().map(\n                |(worktree_path, full_path): (Arc<RelPath>, String)| {\n                    let rel_path = worktree_path\n                        .strip_prefix(&directory_path)\n                        .map_or_else(|_| worktree_path.clone(), |rel_path| rel_path.into());\n","sourceCodeStart":1237,"sourceCodeEnd":1273,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/agent_ui/src/mention_set.rs#L1237-L1273","documentation":"The absolute directory was successfully mapped to a ProjectPath, but entry_for_path returned None — the worktree's current snapshot contains no entry at that path, typically because the directory was deleted, ignored, or not yet scanned when the mention was expanded in full_mention_for_directory.","triggerScenarios":"Thrown at crates/agent_ui/src/mention_set.rs:1255 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the directory still exists on disk and is not git-ignored by the owning worktree","Wait for the worktree scan to finish (large or remote worktrees index asynchronously) and retry the mention","Re-add or refresh the worktree so its snapshot includes the directory"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}