{"record":{"id":"83f82cb073c4a903","repo":"zed-industries/zed","slug":"project-path-not-found-for-symbol-mention-abs-pat","errorCode":null,"errorMessage":"project path not found for symbol mention {abs_path:?}","messagePattern":"project path not found for symbol mention (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent_ui/src/mention_set.rs","lineNumber":475,"sourceCode":"                tracked_buffers: Vec::new(),\n            })\n        })\n    }\n\n    fn confirm_mention_for_symbol(\n        &self,\n        abs_path: PathBuf,\n        line_range: RangeInclusive<u32>,\n        cx: &mut Context<Self>,\n    ) -> Task<Result<Mention>> {\n        let Some(project) = self.project.upgrade() else {\n            return Task::ready(Err(anyhow!(\"project not found\")));\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 symbol mention {abs_path:?}\"\n            )));\n        };\n        let buffer = project.update(cx, |project, cx| project.open_buffer(project_path, cx));\n        cx.spawn(async move |_, cx| {\n            let buffer = buffer.await?;\n            let mention = buffer.update(cx, |buffer, cx| {\n                let start = Point::new(*line_range.start(), 0).min(buffer.max_point());\n                let end = Point::new(*line_range.end() + 1, 0).min(buffer.max_point());\n                let content = buffer.text_for_range(start..end).collect();\n                Mention::Text {\n                    content,\n                    tracked_buffers: vec![cx.entity()],\n                }\n            });\n            Ok(mention)\n        })\n    }","sourceCodeStart":457,"sourceCodeEnd":493,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/agent_ui/src/mention_set.rs#L457-L493","documentation":"Emitted by confirm_mention_for_symbol when project.project_path_for_absolute_path returns None for the file backing a code symbol mention. The symbol's source file lies outside all open worktrees, so its line range cannot be anchored to a project buffer; the offending input is abs_path of the symbol's file.","triggerScenarios":"Thrown at crates/agent_ui/src/mention_set.rs:475 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the file's directory as a worktree so the symbol's file is in the project","Reopen the workspace containing the file before creating the symbol mention","Mention the file by copying its content instead of as a symbol"],"exampleFix":null,"handlingStrategy":"validation","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"}