{"record":{"id":"746fbba2100ecce7","repo":"zed-industries/zed","slug":"cannot-spawn-tasks-as-a-guest","errorCode":null,"errorMessage":"cannot spawn tasks as a guest","messagePattern":"cannot spawn tasks as a guest","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/terminal_view/src/terminal_panel.rs","lineNumber":549,"sourceCode":"                }\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)\n        } else {\n            task.shell.clone()\n        };\n\n        let task = prepare_task_for_spawn(task, &shell, is_windows);\n","sourceCodeStart":531,"sourceCodeEnd":567,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/terminal_view/src/terminal_panel.rs#L531-L567","documentation":"Returned by spawn_task when the project is a guest/collab session (project.is_via_collab()). Guests cannot run tasks on the host machine, so the spawn is refused with this sentinel before any terminal is created.","triggerScenarios":"Thrown at crates/terminal_view/src/terminal_panel.rs:549 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run tasks from a full (non-guest) session"],"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-14T05:17:10.506Z"}