zed-industries/zed · error
Worktree creation was canceled
Error message
Worktree creation was canceled
What it means
Sentinel raised in await_and_rollback_on_failure: one of the per-repository worktree creation receivers was cancelled (dropped before sending a result), so the creation was interrupted and any partially created worktrees must be rolled back.
Source
Thrown at crates/git_ui_core/src/worktree_service.rs:550
) -> anyhow::Result<Vec<PathBuf>> {
let mut created_paths: Vec<PathBuf> = Vec::new();
let mut repos_and_paths: Vec<(Entity<Repository>, PathBuf)> = Vec::new();
let mut first_error: Option<anyhow::Error> = None;
for (repo, new_path, receiver) in creation_infos {
repos_and_paths.push((repo.clone(), new_path.clone()));
match receiver.await {
Ok(Ok(())) => {
created_paths.push(new_path);
}
Ok(Err(err)) => {
if first_error.is_none() {
first_error = Some(err);
}
}
Err(_canceled) => {
if first_error.is_none() {
first_error = Some(anyhow!("Worktree creation was canceled"));
}
}
}
}
let Some(err) = first_error else {
return Ok(created_paths);
};
// Rollback all attempted worktrees
let mut rollback_futures = Vec::new();
for (rollback_repo, rollback_path) in &repos_and_paths {
let receiver = cx
.update(|_, cx| {
rollback_repo.update(cx, |repo, _cx| {
repo.remove_worktree(rollback_path.clone(), true)
})
})View on GitHub (pinned to f4178619ac)
Solutions
- Retry the worktree creation; it was cancelled before completion
- Avoid closing the window or switching workspaces while creation is in progress
- Check the first_error reported alongside this cancellation for the underlying cause
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/git_ui_core/src/worktree_service.rs:550 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/a415474eda038182.
Report an issue: GitHub.