zed-industries/zed · error

failed to open a workspace

Error message

failed to open a workspace

What it means

Aggregate guard in open_workspaces(): at least one workspace open attempt errored; after per-workspace handling, a single 'failed to open a workspace' error is raised to signal overall failure to the caller.

Source

Thrown at crates/zed/src/zed/open_listener.rs:946

                    });
                }
                cx.spawn(async move |cx| {
                    open_remote_project(
                        connection,
                        workspace_paths.paths().to_vec(),
                        app_state,
                        open_options,
                        cx,
                    )
                    .await
                    .log_err();
                })
                .detach();
            }
        }
    }

    anyhow::ensure!(!errored, "failed to open a workspace");

    Ok(())
}

async fn open_local_workspace(
    mut workspace_paths: Vec<String>,
    diff_paths: Vec<[String; 2]>,
    diff_all: bool,
    open_options: workspace::OpenOptions,
    cwd: Option<PathBuf>,
    responses: &dyn CliResponseSink,
    app_state: &Arc<AppState>,
    cx: &mut AsyncApp,
) -> bool {
    let user_provided_paths = !workspace_paths.is_empty();

    // When only diff paths are provided (no regular paths), add the CLI's
    // working directory so the workspace opens with the right context.

View on GitHub (pinned to f4178619ac)

Solutions

  1. Check earlier per-workspace errors/logs for the root cause
  2. Verify paths/connections and retry opening the failed workspace
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at crates/zed/src/zed/open_listener.rs:946 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/764bb540514664f6. Report an issue: GitHub.