zed-industries/zed · error
cannot spawn tasks as a guest
Error message
cannot spawn tasks as a guest
What it means
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.
Source
Thrown at crates/terminal_view/src/terminal_panel.rs:549
}
})
.detach_and_log_err(cx);
}
pub fn spawn_task(
&mut self,
task: &SpawnInTerminal,
window: &mut Window,
cx: &mut Context<Self>,
) -> Task<Result<WeakEntity<Terminal>>> {
let Some(workspace) = self.workspace.upgrade() else {
return Task::ready(Err(anyhow!("failed to read workspace")));
};
let project = workspace.read(cx).project().read(cx);
if project.is_via_collab() {
return Task::ready(Err(anyhow!("cannot spawn tasks as a guest")));
}
let remote_client = project.remote_client();
let is_windows = project.path_style(cx).is_windows();
let remote_shell = remote_client
.as_ref()
.and_then(|remote_client| remote_client.read(cx).shell());
let shell = if let Some(remote_shell) = remote_shell
&& task.shell == Shell::System
{
Shell::Program(remote_shell)
} else {
task.shell.clone()
};
let task = prepare_task_for_spawn(task, &shell, is_windows);
View on GitHub (pinned to f4178619ac)
Solutions
- Run tasks from a full (non-guest) session
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/terminal_view/src/terminal_panel.rs:549 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/746fbba2100ecce7.
Report an issue: GitHub.