{"record":{"id":"21a5858085c52a86","repo":"zed-industries/zed","slug":"project-path-not-found-for-edit-prediction-target","errorCode":null,"errorMessage":"project path not found for edit prediction target {path:?}","messagePattern":"project path not found for edit prediction target (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/editor/src/edit_prediction.rs","lineNumber":1662,"sourceCode":"            suggestion_accepted = accepted,\n            file_extension = extension,\n        );\n    }\n\n    fn open_editor_at_anchor(\n        snapshot: &language::BufferSnapshot,\n        target: language::Anchor,\n        workspace: &Entity<Workspace>,\n        window: &mut Window,\n        cx: &mut App,\n    ) -> Task<Result<()>> {\n        workspace.update(cx, |workspace, cx| {\n            let path = snapshot.file().map(|file| file.full_path(cx));\n            let Some(project_path) = path\n                .as_ref()\n                .and_then(|path| workspace.project().read(cx).find_project_path(path, cx))\n            else {\n                return Task::ready(Err(anyhow::anyhow!(\n                    \"project path not found for edit prediction target {path:?}\"\n                )));\n            };\n            let target = text::ToPoint::to_point(&target, snapshot);\n            let item = workspace.open_path(project_path, None, true, window, cx);\n            window.spawn(cx, async move |cx| {\n                let Some(editor) = item.await?.downcast::<Editor>() else {\n                    return Ok(());\n                };\n                editor\n                    .update_in(cx, |editor, window, cx| {\n                        editor.go_to_singleton_buffer_point(target, window, cx);\n                    })\n                    .ok();\n                anyhow::Ok(())\n            })\n        })\n    }","sourceCodeStart":1644,"sourceCodeEnd":1680,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/editor/src/edit_prediction.rs#L1644-L1680","documentation":"While opening an editor at an edit-prediction anchor, the buffer's file full_path could not be mapped to a project path via workspace.project().find_project_path. This means the buffer containing the suggestion belongs to a file that no open project tracks (untitled buffer, file outside all worktrees), so no project-scoped editor can be opened at the target.","triggerScenarios":"Thrown at crates/editor/src/edit_prediction.rs:1662 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Open a plain editor for the buffer's path without project association instead of failing","Surface a non-blocking notice to the user that the file is not part of an open project","Guard before spawning the task: skip anchor navigation when snapshot.file() has no project path"],"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-14T05:17:10.506Z"}