zed-industries/zed · error
Cannot create worktree: remote connection is not active
Error message
Cannot create worktree: remote connection is not active
What it means
Guard in create_worktree_workspace_inner: the project uses a remote connection but the client reports is_disconnected, so creating a worktree on the remote host would fail; the operation is refused until reconnection.
Source
Thrown at crates/git_ui_core/src/worktree_service.rs:814
toast_workspace,
"worktree create",
anyhow!("No git repositories found in the project"),
cx,
);
return Task::ready(Err(anyhow!("No git repositories found in the project")));
}
if remote_connection_options.is_some() {
let is_disconnected = project
.read(cx)
.remote_client()
.is_some_and(|client| client.read(cx).is_disconnected());
if is_disconnected {
let toast_workspace = cx.entity();
show_error_toast(
toast_workspace,
"worktree create",
anyhow!("Cannot create worktree: remote connection is not active"),
cx,
);
return Task::ready(Err(anyhow!(
"Cannot create worktree: remote connection is not active"
)));
}
}
let worktree_name = action.worktree_name.clone();
let branch_target = action.branch_target.clone();
let fetch_askpass_delegates = if remote_branch_fetch_mode.should_fetch() {
remote_branch_to_fetch(&branch_target)
.map(|(remote_name, _branch_name)| {
git_repos
.iter()
.map(|_| {
create_worktree_askpass_delegate(
workspace_handle.clone(),View on GitHub (pinned to f4178619ac)
Solutions
- Reconnect to the remote server (Remote > Reconnect) and retry worktree creation
- Verify SSH/container connectivity to the remote host
- Restart the remote server process if it remains disconnected
- Work on the project locally if the remote connection cannot be restored
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/git_ui_core/src/worktree_service.rs:814 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/5eb88a55c165f76b.
Report an issue: GitHub.