{"record":{"id":"82336c44c6660065","repo":"zed-industries/zed","slug":"cannot-list-directory-in-remote-project","errorCode":null,"errorMessage":"cannot list directory in remote project","messagePattern":"cannot list directory in remote project","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/project/src/project.rs","lineNumber":5064,"sourceCode":"\n        cx.spawn(async move |_, cx| {\n            if let Some(buffer_worktree_id) = buffer_worktree_id\n                && let Some((worktree, _)) = worktrees_with_ids\n                    .iter()\n                    .find(|(_, id)| *id == buffer_worktree_id)\n            {\n                for candidate in candidates.iter() {\n                    if let Some(path) = Self::resolve_path_in_worktree(worktree, candidate, cx) {\n                        return Some(path);\n                    }\n                }\n            }\n            for (worktree, id) in worktrees_with_ids {\n                if Some(id) == buffer_worktree_id {\n                    continue;\n                }\n                for candidate in candidates.iter() {\n                    if let Some(path) = Self::resolve_path_in_worktree(&worktree, candidate, cx) {\n                        return Some(path);\n                    }\n                }\n            }\n            None\n        })\n    }\n\n    fn resolve_path_in_worktree(\n        worktree: &Entity<Worktree>,\n        path: &RelPath,\n        cx: &mut AsyncApp,\n    ) -> Option<ResolvedPath> {\n        worktree.read_with(cx, |worktree, _| {\n            worktree.entry_for_path(path).map(|entry| {\n                let project_path = ProjectPath {\n                    worktree_id: worktree.id(),\n                    path: entry.path.clone(),","sourceCodeStart":5046,"sourceCodeEnd":5082,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/project/src/project.rs#L5046-L5082","documentation":"Raised when listing a directory: the project is remote, and listing arbitrary directories outside worktrees is only supported locally (or via a dedicated remote path); the request as issued cannot be served in the remote project context.","triggerScenarios":"Thrown at crates/project/src/project.rs:5009 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the local worktree/fs API for listing directories"],"exampleFix":null,"handlingStrategy":"validation","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"}