{"record":{"id":"09f378c4dade0906","repo":"zed-industries/zed","slug":"project-not-found-09f378","errorCode":null,"errorMessage":"project not found","messagePattern":"project not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/agent_ui/src/mention_set.rs","lineNumber":391,"sourceCode":"                        // Remove mention\n                        editor.edit([(start_anchor..end_anchor, \"\")], cx);\n                    });\n                    this.mentions.remove(&crease_id);\n                    this.crease_entities.remove(&crease_id);\n                })\n                .ok();\n            }\n        })\n    }\n\n    pub fn confirm_mention_for_file(\n        &self,\n        abs_path: PathBuf,\n        supports_images: bool,\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\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 file mention {abs_path:?}\"\n            )));\n        };\n\n        if is_raster_image_path(&abs_path) {\n            if !supports_images {\n                return Task::ready(Err(anyhow!(\"This model does not support images yet\")));\n            }\n            let task = project.update(cx, |project, cx| project.open_image(project_path, cx));\n            return cx.spawn(async move |_, cx| {\n                let image = task.await?;","sourceCodeStart":373,"sourceCodeEnd":409,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/agent_ui/src/mention_set.rs#L373-L409","documentation":"Emitted by confirm_mention_for_file when the mention set's WeakEntity<Project> cannot be upgraded — the project was dropped before the file mention was confirmed. Confirming a file mention requires the project to map the path and open the buffer, so with a stale project handle the operation is refused. The fault is the dropped project entity, not the file path.","triggerScenarios":"Thrown at crates/agent_ui/src/mention_set.rs:391 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm file mentions while the project is still open","Re-add the mention after reopening the workspace so it binds to a live project"],"exampleFix":null,"handlingStrategy":"fallback","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"}