Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Refactor: Remove worktree asynchronously for speed

Maximilian Roos45f13dcc7e9e
diff --git a/.claude-plugin/skills/worktrunk/reference/README.md b/.claude-plugin/skills/worktrunk/reference/README.md
index 7dbb0dfdd..76e928241 100644
--- a/.claude-plugin/skills/worktrunk/reference/README.md
+++ b/.claude-plugin/skills/worktrunk/reference/README.md
@@ -45,8 +45,7 @@ $ wt merge
auth.rs | 13 +++++++++++++
1 file changed, 13 insertions(+)
βœ… Merged to main (1 commit, 1 file, +13)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for fix-auth, changed directory to ../repo/
+πŸ”„ Removing fix-auth worktree & branch in background
```
See [`wt merge`](#wt-merge-target) for all options.
@@ -216,8 +215,7 @@ $ wt merge
tests/test_auth.py | 14 ++++++++++++++
2 files changed, 45 insertions(+)
βœ… Merged to main (1 commit, 2 files, +45)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature-auth, changed directory to ../repo/
+πŸ”„ Removing feature-auth worktree & branch in background
```
<details>
diff --git a/README.md b/README.md
index 7dbb0dfdd..76e928241 100644
--- a/README.md
+++ b/README.md
@@ -45,8 +45,7 @@ $ wt merge
auth.rs | 13 +++++++++++++
1 file changed, 13 insertions(+)
βœ… Merged to main (1 commit, 1 file, +13)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for fix-auth, changed directory to ../repo/
+πŸ”„ Removing fix-auth worktree & branch in background
```
See [`wt merge`](#wt-merge-target) for all options.
@@ -216,8 +215,7 @@ $ wt merge
tests/test_auth.py | 14 ++++++++++++++
2 files changed, 45 insertions(+)
βœ… Merged to main (1 commit, 2 files, +45)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature-auth, changed directory to ../repo/
+πŸ”„ Removing feature-auth worktree & branch in background
```
<details>
diff --git a/src/commands/merge.rs b/src/commands/merge.rs
index 3c8648d58..119f0f475 100644
--- a/src/commands/merge.rs
+++ b/src/commands/merge.rs
@@ -2,7 +2,7 @@ use worktrunk::HookType;
use worktrunk::config::{Command, CommandPhase, ProjectConfig};
use worktrunk::git::Repository;
use worktrunk::path::format_path_for_display;
-use worktrunk::styling::{CYAN, ERROR, ERROR_EMOJI, GREEN_BOLD, HINT, HINT_EMOJI};
+use worktrunk::styling::{ERROR, ERROR_EMOJI, GREEN_BOLD, HINT, HINT_EMOJI};
use super::command_approval::approve_command_batch;
use super::command_executor::CommandContext;
@@ -188,7 +188,6 @@ pub fn handle_merge(
repo.ensure_clean_working_tree()?;
// STEP 2: Remove worktree via shared remove output handler so final message matches wt remove
- crate::output::progress(format!("{CYAN}Removing worktree & branch...{CYAN:#}"))?;
let worktree_root = repo.worktree_root()?;
let remove_result = RemoveResult::RemovedWorktree {
main_path: destination_path.clone(),
@@ -199,7 +198,7 @@ pub fn handle_merge(
force_delete: false,
target_branch: Some(target_branch.clone()),
};
- crate::output::handle_remove_output(&remove_result, Some(&current_branch), true, false)?;
+ crate::output::handle_remove_output(&remove_result, Some(&current_branch), true, true)?;
} else {
// Print comprehensive summary (worktree preserved)
handle_merge_summary_output(None)?;
diff --git a/tests/integration_tests/bare_repository.rs b/tests/integration_tests/bare_repository.rs
index 9ef1eda19..a052fce34 100644
--- a/tests/integration_tests/bare_repository.rs
+++ b/tests/integration_tests/bare_repository.rs
@@ -533,7 +533,13 @@ worktree-path = "{{ branch }}"
);
}
- // Verify feature worktree was removed
+ // Wait for background removal to complete
+ for _ in 0..50 {
+ if !feature_worktree.exists() {
+ break;
+ }
+ std::thread::sleep(std::time::Duration::from_millis(100));
+ }
assert!(
!feature_worktree.exists(),
"Feature worktree should be removed after merge"
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_bash.snap
index 04e093c7d..0587f19f4 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_bash.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_bash.snap
@@ -27,5 +27,4 @@ expression: output.normalized()
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [TMPDIR]/test-repo
+πŸ”„ Removing feature worktree & branch in background
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_zsh.snap
index 04e093c7d..0587f19f4 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_zsh.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_mixed_stdout_stderr_zsh.snap
@@ -27,5 +27,4 @@ expression: output.normalized()
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [TMPDIR]/test-repo
+πŸ”„ Removing feature worktree & branch in background
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap
index c01e598a1..8a12341c1 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap
@@ -16,5 +16,4 @@ expression: output.normalized()
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [TMPDIR]/test-repo
+πŸ”„ Removing feature worktree & branch in background
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap
index c01e598a1..8a12341c1 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap
@@ -16,5 +16,4 @@ expression: output.normalized()
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [TMPDIR]/test-repo
+πŸ”„ Removing feature worktree & branch in background
diff --git a/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snap b/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snap
index bd7b25fbf..23db25049 100644
Binary files a/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snap and b/tests/snapshots/integration__integration_tests__directives__merge_internal_remove.snap differ
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap
index 56d623dd7..5b0e2c523 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_and_squash.snap
@@ -39,7 +39,6 @@ exit_code: 0
  file2.txt | 1 +
  2 files changed, 2 insertions(+)
βœ… Merged to main (1 commit, 2 files, +2)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap
index 9a834d426..112dc7c28 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_deterministic.snap
@@ -35,7 +35,6 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap
index 6e3ae57b2..fd5b332d4 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_auto_commit_with_llm.snap
@@ -37,7 +37,6 @@ exit_code: 0
  auth.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap b/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap
index 05f50d268..791b4cfff 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_dirty_working_tree.snap
@@ -32,7 +32,6 @@ exit_code: 0
  dirty.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap
index eb19e8bc0..09d3c0efb 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_fast_forward.snap
@@ -26,7 +26,6 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap
index 637812d98..ce4e7f09e 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_commits.snap
@@ -10,7 +10,7 @@ info:
COLUMNS: "150"
GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
- GIT_CONFIG_GLOBAL: /dev/null
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
GIT_CONFIG_SYSTEM: /dev/null
GIT_EDITOR: ""
LANG: C
@@ -22,7 +22,6 @@ success: true
exit_code: 0
----- stdout -----
βœ… Merged to main (no new commits, no rebase needed)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for no-commits, changed directory to [REPO]
+πŸ”„ Removing no-commits worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap
index e0908fca7..7c8d9442b 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_commits_with_changes.snap
@@ -32,7 +32,6 @@ exit_code: 0
  newfile.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for no-commits-dirty, changed directory to [REPO]
+πŸ”„ Removing no-commits-dirty worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_remote.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_remote.snap
index 2453c647d..611b68a19 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_no_remote.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_remote.snap
@@ -25,7 +25,6 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap b/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap
index 897895f8d..4c8b35467 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_no_squash.snap
@@ -29,7 +29,6 @@ exit_code: 0
  file2.txt | 1 +
  2 files changed, 2 insertions(+)
βœ… Merged to main (2 commits, 2 files, +2)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap
index eb19e8bc0..09d3c0efb 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_not_fast_forward.snap
@@ -26,7 +26,6 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap
index 2b00c99a3..e7d610d6f 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_failure.snap
@@ -27,8 +27,7 @@ exit_code: 1
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
πŸ”„ Running post-merge:
  exit 1
🟑 Command failed: exit status: 1
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap
index d91cda694..8a1a7ac4b 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_named.snap
@@ -27,8 +27,7 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
πŸ”„ Running post-merge notify:
  echo 'Merge to main complete' > notify.txt
πŸ”„ Running post-merge deploy:
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap
index 232b038f1..5cea7c09d 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_no_verify.snap
@@ -28,7 +28,6 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap
index de8eab028..cf2673bc0 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_post_merge_command_success.snap
@@ -27,8 +27,7 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
πŸ”„ Running post-merge:
  echo 'merged feature to main' > post-merge-ran.txt
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap
index f59e6c8ae..10889322a 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_commit_command_success.snap
@@ -35,8 +35,7 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
Pre-commit check passed
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap
index beed503ed..097b15421 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap
@@ -33,8 +33,7 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----

diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap
index c1b0f7bf5..d0c3246e2 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap
@@ -29,8 +29,7 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----

diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap
index f1d64b90e..2aa574986 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_squash_command_success.snap
@@ -29,8 +29,7 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
Pre-commit check passed
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap
index 8fa5af961..c10d54bdd 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch.snap
@@ -26,7 +26,6 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature-from-develop, changed directory to [REPO]
+πŸ”„ Removing feature-from-develop worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap
index 9254828ea..de538fa9c 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_primary_on_different_branch_dirty.snap
@@ -28,7 +28,6 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature-dirty-primary, changed directory to [REPO]
+πŸ”„ Removing feature-dirty-primary worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_rebase_fast_forward.snap b/tests/snapshots/integration__integration_tests__merge__merge_rebase_fast_forward.snap
index eb2c6b7f1..92d95fd4b 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_rebase_fast_forward.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_rebase_fast_forward.snap
@@ -23,7 +23,6 @@ exit_code: 0
----- stdout -----
βœ… Fast-forwarded to main
βœ… Merged to main (no new commits)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for fast-forward-test, changed directory to [REPO]
+πŸ”„ Removing fast-forward-test worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_rebase_true_rebase.snap b/tests/snapshots/integration__integration_tests__merge__merge_rebase_true_rebase.snap
index f35932115..fe278aa4a 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_rebase_true_rebase.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_rebase_true_rebase.snap
@@ -28,7 +28,6 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for true-rebase-test, changed directory to [REPO]
+πŸ”„ Removing true-rebase-test worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap
index cf54c7d02..bcef9ddda 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_deterministic.snap
@@ -38,7 +38,6 @@ exit_code: 0
  file3.txt | 1 +
  3 files changed, 3 insertions(+)
βœ… Merged to main (1 commit, 3 files, +3)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap
index 508e99cd5..646419bfd 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_empty_changes.snap
@@ -32,7 +32,6 @@ exit_code: 0
  - Revert to initial
βšͺ No changes after squashing 3 commits
βœ… Merged to main (no new commits, no rebase needed)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_fallback.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_fallback.snap
index 40ddeb172..5c386d21d 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_fallback.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_llm_fallback.snap
@@ -37,7 +37,6 @@ exit_code: 0
  file2.txt | 1 +
  2 files changed, 2 insertions(+)
βœ… Merged to main (1 commit, 2 files, +2)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap
index b28a9d213..d951f9e0a 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_single_commit.snap
@@ -26,7 +26,6 @@ exit_code: 0
  file1.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap
index 01c51bfc6..d97ad50d4 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_llm.snap
@@ -38,7 +38,6 @@ exit_code: 0
  auth.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_working_tree_creates_backup.snap b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_working_tree_creates_backup.snap
index ae3790550..d13fa15d6 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_squash_with_working_tree_creates_backup.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_squash_with_working_tree_creates_backup.snap
@@ -39,7 +39,6 @@ exit_code: 0
  file2.txt | 1 +
  2 files changed, 2 insertions(+)
βœ… Merged to main (1 commit, 2 files, +2)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap
index 2453c647d..611b68a19 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_to_default.snap
@@ -25,7 +25,6 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap b/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap
index c6f274dba..4c9e8e49f 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_to_non_default_target.snap
@@ -28,7 +28,6 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to staging (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature-for-staging, changed directory to [REPO]
+πŸ”„ Removing feature-for-staging worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_when_primary_not_on_default_but_default_has_worktree.snap b/tests/snapshots/integration__integration_tests__merge__merge_when_primary_not_on_default_but_default_has_worktree.snap
index 0829a6f25..09d3c0efb 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_when_primary_not_on_default_but_default_has_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_when_primary_not_on_default_but_default_has_worktree.snap
@@ -26,7 +26,6 @@ exit_code: 0
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
βœ… Merged to main (1 commit, 1 file, +1)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO].main-wt
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap b/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap
index 884c9afdc..3a6d5266b 100644
--- a/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap
+++ b/tests/snapshots/integration__integration_tests__merge__merge_with_untracked_files.snap
@@ -42,7 +42,6 @@ exit_code: 0
  untracked2.txt | 1 +
  3 files changed, 3 insertions(+)
βœ… Merged to main (1 commit, 3 files, +3)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature, changed directory to [REPO]
+πŸ”„ Removing feature worktree & branch in background
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap
index 68db48e2d..b0997a39c 100644
--- a/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap
+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_complex.snap
@@ -46,8 +46,7 @@ exit_code: 0
  jwt.rs | 8 ++++++++
  3 files changed, 33 insertions(+)
βœ… Merged to main (1 commit, 3 files, +33)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature-auth, changed directory to [REPO]
+πŸ”„ Removing feature-auth worktree & branch in background
πŸ”„ Running post-merge install:
  cargo install --path .
diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap
index 9e3260cd0..ebfec292b 100644
--- a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap
+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_pre_merge.snap
@@ -40,8 +40,7 @@ exit_code: 0
  tests/test_auth.py | 14 ++++++++++++++
  2 files changed, 45 insertions(+)
βœ… Merged to main (1 commit, 2 files, +45)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for feature-auth, changed directory to [REPO]
+πŸ”„ Removing feature-auth worktree & branch in background
----- stderr -----

diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap
index aebe8baac..6ca4d5bd3 100644
--- a/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap
+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_simple.snap
@@ -26,7 +26,6 @@ exit_code: 0
  auth.rs | 13 +++++++++++++
  1 file changed, 13 insertions(+)
βœ… Merged to main (1 commit, 1 file, +13)
-πŸ”„ Removing worktree & branch...
-βœ… Removed worktree & branch for fix-auth, changed directory to [REPO]
+πŸ”„ Removing fix-auth worktree & branch in background
----- stderr -----