{"record":{"id":"28310b516cddb472","repo":"zed-industries/zed","slug":"failed-to-read-workspace","errorCode":null,"errorMessage":"failed to read workspace","messagePattern":"failed to read workspace","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/terminal_view/src/terminal_panel.rs","lineNumber":543,"sourceCode":"                    panel.add_terminal_shell(\n                        Some(action.working_directory.clone()),\n                        RevealStrategy::Always,\n                        window,\n                        cx,\n                    )\n                }\n            })\n            .detach_and_log_err(cx);\n    }\n\n    pub fn spawn_task(\n        &mut self,\n        task: &SpawnInTerminal,\n        window: &mut Window,\n        cx: &mut Context<Self>,\n    ) -> Task<Result<WeakEntity<Terminal>>> {\n        let Some(workspace) = self.workspace.upgrade() else {\n            return Task::ready(Err(anyhow!(\"failed to read workspace\")));\n        };\n\n        let project = workspace.read(cx).project().read(cx);\n\n        if project.is_via_collab() {\n            return Task::ready(Err(anyhow!(\"cannot spawn tasks as a guest\")));\n        }\n\n        let remote_client = project.remote_client();\n        let is_windows = project.path_style(cx).is_windows();\n        let remote_shell = remote_client\n            .as_ref()\n            .and_then(|remote_client| remote_client.read(cx).shell());\n\n        let shell = if let Some(remote_shell) = remote_shell\n            && task.shell == Shell::System\n        {\n            Shell::Program(remote_shell)","sourceCodeStart":525,"sourceCodeEnd":561,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/terminal_view/src/terminal_panel.rs#L525-L561","documentation":"Returned by spawn_task when self.workspace fails to upgrade — the owning Workspace entity was dropped while the terminal panel still holds a weak handle. Without the workspace, the task's project/cwd cannot be resolved, so the spawn aborts immediately.","triggerScenarios":"Thrown at crates/terminal_view/src/terminal_panel.rs:543 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the task spawn while the workspace is open"],"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-14T05:17:10.506Z"}