Skip to content

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

refactor: Display warnings when `cd` fails for existing worktrees

Maximilian Roos73024761fc27
diff --git a/src/commands/select.rs b/src/commands/select.rs
index 6643e0d38..80e98d800 100644
--- a/src/commands/select.rs
+++ b/src/commands/select.rs
@@ -374,7 +374,8 @@ pub fn handle_select() -> anyhow::Result<()> {
blank_line()?;
// Show success message (show shell integration hint if not configured)
- handle_switch_output(&result, &resolved_branch, false)?;
+ // select is always interactive (TUI), so is_directive_mode is false
+ handle_switch_output(&result, &resolved_branch, false, false)?;
}
Ok(())
diff --git a/src/commands/worktree.rs b/src/commands/worktree.rs
index 48524e0a6..220f36e84 100644
--- a/src/commands/worktree.rs
+++ b/src/commands/worktree.rs
@@ -20,7 +20,7 @@
//! $ wt switch my-feature
//! Created new branch and worktree for 'my-feature' at /path/to/worktree
//!
-//! To enable automatic cd, run: wt config shell
+//! Run `wt config shell install` to enable automatic cd
//!
//! $ pwd
//! /original/directory # ← User is still here!
diff --git a/src/main.rs b/src/main.rs
index 800478d5d..db6653f4c 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -510,7 +510,8 @@ fn main() {
handle_switch(&branch, create, base.as_deref(), force, !verify, &config)?;
// Show success message (temporal locality: immediately after worktree creation)
- handle_switch_output(&result, &resolved_branch, execute.is_some())?;
+ // Pass cli.internal to indicate whether shell integration is active
+ handle_switch_output(&result, &resolved_branch, execute.is_some(), cli.internal)?;
// Now spawn post-start hooks (background processes, after success message)
// Only run post-start commands when creating a NEW worktree, not when switching to existing
diff --git a/src/output/global.rs b/src/output/global.rs
index 8b15f64bc..e83dc36a9 100644
--- a/src/output/global.rs
+++ b/src/output/global.rs
@@ -83,7 +83,7 @@ pub fn hint(message: impl Into<String>) -> io::Result<()> {
/// Display a shell integration hint (suppressed in directive mode)
///
-/// Shell integration hints like "To enable automatic cd, run: wt config shell install" are only
+/// Shell integration hints like "Run `wt config shell install` to enable automatic cd" are only
/// shown in interactive mode since directive mode users already have shell integration
pub fn shell_integration_hint(message: impl Into<String>) -> io::Result<()> {
with_output(|h| h.shell_integration_hint(message.into()))
diff --git a/src/output/handlers.rs b/src/output/handlers.rs
index e78f44d7e..0154a00a8 100644
--- a/src/output/handlers.rs
+++ b/src/output/handlers.rs
@@ -9,38 +9,6 @@ use worktrunk::styling::{
CYAN, CYAN_BOLD, GREEN, GREEN_BOLD, WARNING, WARNING_BOLD, format_with_gutter,
};
-/// Format message for switch operation (mode-specific via output system)
-fn format_switch_message(result: &SwitchResult, branch: &str) -> (String, bool) {
- match result {
- SwitchResult::AlreadyAt(path) => {
- // Note: output::info() adds the INFO_EMOJI automatically
- let bold = worktrunk::styling::AnstyleStyle::new().bold();
- (
- format!(
- "Already on worktree for {bold}{branch}{bold:#} at {bold}{}{bold:#}",
- format_path_for_display(path)
- ),
- true, // is_info
- )
- }
- SwitchResult::Existing(path) => {
- // created_branch=false means we switched to existing worktree
- (format_switch_success(branch, path, false, None), false)
- }
- SwitchResult::Created {
- path,
- created_branch,
- base_branch,
- } => {
- // Pass through whether we created a new branch and the base branch
- (
- format_switch_success(branch, path, *created_branch, base_branch.as_deref()),
- false,
- )
- }
- }
-}
-
/// Get flag acknowledgment note for remove messages
fn get_flag_note(no_delete_branch: bool, force_delete: bool, branch_deleted: bool) -> &'static str {
if no_delete_branch {
@@ -104,30 +72,63 @@ fn format_remove_message(
/// Shell integration hint message (without emoji - hint() adds it automatically)
fn shell_integration_hint() -> String {
use worktrunk::styling::HINT;
- format!("{HINT}To enable automatic cd, run: wt config shell install{HINT:#}")
+ format!("{HINT}Run `wt config shell install` to enable automatic cd{HINT:#}")
}
/// Handle output for a switch operation
+///
+/// `is_directive_mode` indicates whether shell integration is active (via --internal flag).
+/// When false, we show warnings for operations that can't complete without shell integration.
pub fn handle_switch_output(
result: &SwitchResult,
branch: &str,
has_execute_command: bool,
+ is_directive_mode: bool,
) -> anyhow::Result<()> {
// Set target directory for command execution
super::change_directory(result.path())?;
- // Show message (success or info based on result)
- let (message, is_info) = format_switch_message(result, branch);
- if is_info {
- super::info(message)?;
- } else {
- super::success(message)?;
- }
-
- // If no execute command provided: show shell integration hint
- // (suppressed in directive mode since user already has integration)
- if !has_execute_command {
- super::shell_integration_hint(shell_integration_hint())?;
+ // Show message based on result type and mode
+ match result {
+ SwitchResult::AlreadyAt(path) => {
+ // Already at target - show info, no hint needed
+ let bold = worktrunk::styling::AnstyleStyle::new().bold();
+ super::info(format!(
+ "Already on worktree for {bold}{branch}{bold:#} at {bold}{}{bold:#}",
+ format_path_for_display(path)
+ ))?;
+ }
+ SwitchResult::Existing(path) => {
+ if is_directive_mode || has_execute_command {
+ // Shell integration active or --execute provided - show success
+ super::success(format_switch_success(branch, path, false, None))?;
+ } else {
+ // No shell integration - show warning that we can't cd
+ let bold = worktrunk::styling::AnstyleStyle::new().bold();
+ super::warning(format!(
+ "{WARNING}Worktree for {bold}{branch}{bold:#}{WARNING} at {bold}{}{bold:#}{WARNING}; cannot cd (no shell integration){WARNING:#}",
+ format_path_for_display(path)
+ ))?;
+ super::shell_integration_hint(shell_integration_hint())?;
+ }
+ }
+ SwitchResult::Created {
+ path,
+ created_branch,
+ base_branch,
+ } => {
+ // Creation succeeded - show success
+ super::success(format_switch_success(
+ branch,
+ path,
+ *created_branch,
+ base_branch.as_deref(),
+ ))?;
+ // Show hint if no shell integration and no --execute
+ if !is_directive_mode && !has_execute_command {
+ super::shell_integration_hint(shell_integration_hint())?;
+ }
+ }
}
// Flush output (important for directive mode)
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap
index 103bf35a4..dea4fdc3b 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_accept.snap
@@ -14,4 +14,4 @@ y
  echo 'test command'
test command
✅ Created new worktree for test-approve from main at [REPO]/test-repo.test-approve
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap
index 09c944ae6..9a0288c70 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_decline.snap
@@ -12,4 +12,4 @@ n
💡 Allow and remember? [y/N]
⚪ Commands declined, continuing worktree creation
✅ Created new worktree for test-decline from main at [REPO]/test-repo.test-decline
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap
index a12c134dd..3a2644db1 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_accept.snap
@@ -23,4 +23,4 @@ y
  echo 'Third command'
Third command
✅ Created new worktree for test-mixed-accept from main at [REPO]/test-repo.test-mixed-accept
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap
index f94a2d481..e74e3ddce 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_mixed_approved_unapproved_decline.snap
@@ -15,4 +15,4 @@ n
💡 Allow and remember? [y/N]
⚪ Commands declined, continuing worktree creation
✅ Created new worktree for test-mixed-decline from main at [REPO]/test-repo.test-mixed-decline
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap
index 60e3375b9..b6633e9d9 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_multiple_commands.snap
@@ -26,4 +26,4 @@ y
  echo 'Third command'
Third command
✅ Created new worktree for test-multi from main at [REPO]/test-repo.test-multi
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap
index 77c57c8bc..67841cf65 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_named_commands.snap
@@ -26,4 +26,4 @@ y
  echo 'Running tests...'
Running tests...
✅ Created new worktree for test-named from main at [REPO]/test-repo.test-named
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap
index f23856c17..f8f0bdfa3 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__approval_pty__approval_prompt_permission_error.snap
@@ -16,4 +16,4 @@ y
  echo 'test command'
test command
✅ Created new worktree for test-permission from main at [REPO]/test-repo.test-permission
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap b/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap
index 1d0bce5d9..fe7618adf 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__already_approved_skip_prompt.snap
@@ -25,7 +25,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'approved' > output.txt
✅ Created new worktree for test-approved from main at [REPO].test-approved
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----

diff --git a/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap b/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap
index ae980b43f..fe6e9647a 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__force_bypasses_tty_check.snap
@@ -26,7 +26,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'test command'
✅ Created new worktree for test-force-tty from main at [REPO].test-force-tty
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
test command
diff --git a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap
index 1f3d093f0..88f39e010 100644
--- a/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap
+++ b/tests/snapshots/integration__integration_tests__approval_ui__force_does_not_save_approvals_first_run.snap
@@ -26,7 +26,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'test command' > output.txt
✅ Created new worktree for test-force from main at [REPO].test-force
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----

diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap
index a22642abe..9aa087e9a 100644
--- a/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap
+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_hooks_post_create.snap
@@ -27,7 +27,7 @@ exit_code: 0
🔄 Running post-create install:
  uv sync
✅ Created new worktree for feature-x from main at [REPO].feature-x
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
🔄 Running post-start dev:
  uv run dev
diff --git a/tests/snapshots/integration__integration_tests__merge__readme_example_simple_switch.snap b/tests/snapshots/integration__integration_tests__merge__readme_example_simple_switch.snap
index eae6e2af8..6a68b8d4d 100644
--- a/tests/snapshots/integration__integration_tests__merge__readme_example_simple_switch.snap
+++ b/tests/snapshots/integration__integration_tests__merge__readme_example_simple_switch.snap
@@ -23,6 +23,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for fix-auth from main at [REPO].fix-auth
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap
index 5525317a6..e5ccf738a 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__both_create_and_start.snap
@@ -25,7 +25,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'Setup done' > setup.txt
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
🔄 Running post-start server:
  sleep 0.05 && echo 'Server running' > server.txt
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap
index cbadbb9ad..0127d5877 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_failing_command.snap
@@ -26,7 +26,7 @@ exit_code: 0
  exit 1
🟡 Command failed: exit status: 1
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----

diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap
index d786da458..b8ebf9388 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiline_control_structure.snap
@@ -29,7 +29,7 @@ exit_code: 0
  echo 'File exists' > result.txt
  fi
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----

diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap
index a88e14634..8c33c6087 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_multiple_commands_array.snap
@@ -27,7 +27,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'Second'
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
First
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap
index 62f16e8f2..e96f8a7c3 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_named_commands.snap
@@ -27,7 +27,7 @@ exit_code: 0
🔄 Running post-create setup:
  echo 'Running setup'
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
Installing deps
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_no_config.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_no_config.snap
index 481d05722..6e3a0c272 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_no_config.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_no_config.snap
@@ -23,6 +23,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap
index cfee110d5..43f1bd673 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_single_command.snap
@@ -25,7 +25,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'Setup complete'
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
Setup complete
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap
index 90b1764bb..176848d23 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_create_template_expansion.snap
@@ -31,7 +31,7 @@ exit_code: 0
🔄 Running post-create:
  echo 'Root: [REPO]' >> info.txt
✅ Created new worktree for feature/test from main at [REPO].feature-test
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----

diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap
index 05319b69e..5d56ad1e0 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_complex_shell.snap
@@ -23,7 +23,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
🔄 Running post-start:
  echo 'line1
  line2
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap
index 2314130e3..902f28a9c 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_create_with_command.snap
@@ -23,7 +23,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
🔄 Running post-start:
  echo 'POST-START-RAN' > post_start_marker.txt
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap
index 90ae00623..d48815763 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_invalid_command.snap
@@ -23,7 +23,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
🔄 Running post-start:
  echo 'unclosed quote
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap
index 15a86a08c..235bcf5be 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_log_captures_output.snap
@@ -23,7 +23,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
🔄 Running post-start:
  echo 'stdout output' && echo 'stderr output' >&2
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap
index 9cd98f9f9..5ecc7a6da 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiline_with_newlines.snap
@@ -23,7 +23,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
🔄 Running post-start:
  echo 'first line' > multiline.txt
  echo 'second line' >> multiline.txt
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap
index b9404bda0..ddd960fba 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_multiple_background.snap
@@ -23,7 +23,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
🔄 Running post-start task1:
  echo 'Task 1 running' > task1.txt
🔄 Running post-start task2:
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap
index 11c5d94f6..5ba363ec2 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_separate_logs.snap
@@ -23,7 +23,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
🔄 Running post-start task1:
  echo 'TASK1_OUTPUT'
🔄 Running post-start task2:
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap
index 9b9c84959..dc3b2a552 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_single_background.snap
@@ -23,7 +23,7 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
🔄 Running post-start:
  sleep 0.1 && echo 'Background task done' > background.txt
diff --git a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snap b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snap
index b829b0f96..1cb8f4efb 100644
--- a/tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snap
+++ b/tests/snapshots/integration__integration_tests__post_start_commands__post_start_skip_existing.snap
@@ -21,7 +21,7 @@ info:
success: true
exit_code: 0
----- stdout -----
-✅ Switched to worktree for feature at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+🟡 Worktree for feature at [REPO].feature; cannot cd (no shell integration)
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__create_with_base_main.snap b/tests/snapshots/integration__integration_tests__switch__create_with_base_main.snap
index f396af064..9eb2bdbf6 100644
--- a/tests/snapshots/integration__integration_tests__switch__create_with_base_main.snap
+++ b/tests/snapshots/integration__integration_tests__switch__create_with_base_main.snap
@@ -25,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for new-feature from main at [REPO].new-feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_base_without_create.snap b/tests/snapshots/integration__integration_tests__switch__switch_base_without_create.snap
index 03b75a1a1..97f3ac983 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_base_without_create.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_base_without_create.snap
@@ -25,6 +25,5 @@ exit_code: 0
----- stdout -----
🟡 --base flag is only used with --create, ignoring
⚪ Already on worktree for main at [REPO]
-💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_create_new.snap b/tests/snapshots/integration__integration_tests__switch__switch_create_new.snap
index 026191155..d5e433c7d 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_create_new.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_create_new.snap
@@ -23,6 +23,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature-x from main at [REPO].feature-x
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_create_no_remote.snap b/tests/snapshots/integration__integration_tests__switch__switch_create_no_remote.snap
index 13d88627b..e206d8804 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_create_no_remote.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_create_no_remote.snap
@@ -23,6 +23,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature from main at [REPO].feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_create_remote_only.snap b/tests/snapshots/integration__integration_tests__switch__switch_create_remote_only.snap
index bfc67cede..e3b5dc5e5 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_create_remote_only.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_create_remote_only.snap
@@ -23,6 +23,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for remote-feature from main at [REPO].remote-feature
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_default_branch_missing_worktree.snap b/tests/snapshots/integration__integration_tests__switch__switch_default_branch_missing_worktree.snap
index 429be589d..2bca73501 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_default_branch_missing_worktree.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_default_branch_missing_worktree.snap
@@ -22,6 +22,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for main at [REPO].main
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_existing_branch.snap b/tests/snapshots/integration__integration_tests__switch__switch_existing_branch.snap
index 14dd2331d..68bf9f0f4 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_existing_branch.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_existing_branch.snap
@@ -21,7 +21,7 @@ info:
success: true
exit_code: 0
----- stdout -----
-✅ Switched to worktree for feature-z at [WORKTREE_FEATURE_Z]
-💡 To enable automatic cd, run: wt config shell install
+🟡 Worktree for feature-z at [WORKTREE_FEATURE_Z]; cannot cd (no shell integration)
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_main_branch.snap b/tests/snapshots/integration__integration_tests__switch__switch_main_branch.snap
index c5dd959f7..1f51af78b 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_main_branch.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_main_branch.snap
@@ -22,6 +22,5 @@ success: true
exit_code: 0
----- stdout -----
⚪ Already on worktree for main at [REPO]
-💡 To enable automatic cd, run: wt config shell install
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_main_branch_to_feature.snap b/tests/snapshots/integration__integration_tests__switch__switch_main_branch_to_feature.snap
index 3dde57554..181f5f881 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_main_branch_to_feature.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_main_branch_to_feature.snap
@@ -22,6 +22,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-a at [REPO].feature-a
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch.snap
index 414b1a5fd..1ca4d904c 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch.snap
@@ -21,7 +21,7 @@ info:
success: true
exit_code: 0
----- stdout -----
-✅ Switched to worktree for feature-a at [REPO].feature-a
-💡 To enable automatic cd, run: wt config shell install
+🟡 Worktree for feature-a at [REPO].feature-a; cannot cd (no shell integration)
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_first.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_first.snap
index 3dde57554..181f5f881 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_first.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_first.snap
@@ -22,6 +22,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-a at [REPO].feature-a
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_second.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_second.snap
index b520a32e9..4cb094b72 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_second.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_second.snap
@@ -22,6 +22,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-b at [REPO].feature-b
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_back.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_back.snap
index 3ce1bfa3f..bbcea892e 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_back.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_back.snap
@@ -21,7 +21,7 @@ info:
success: true
exit_code: 0
----- stdout -----
-✅ Switched to worktree for feature-x at [REPO].feature-x
-💡 To enable automatic cd, run: wt config shell install
+🟡 Worktree for feature-x at [REPO].feature-x; cannot cd (no shell integration)
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_first.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_first.snap
index efcadece1..4a052df50 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_first.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_first.snap
@@ -22,6 +22,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-x at [REPO].feature-x
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_second.snap b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_second.snap
index ea18d8d77..cd18f7251 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_second.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_previous_branch_with_worktrunk_history_second.snap
@@ -22,6 +22,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Switched to worktree for feature-y at [REPO].feature-y
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_primary_on_different_branch.snap b/tests/snapshots/integration__integration_tests__switch__switch_primary_on_different_branch.snap
index c3d174213..54edcbcb5 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_primary_on_different_branch.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_primary_on_different_branch.snap
@@ -23,6 +23,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature-from-main from main at [REPO].feature-from-main
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_to_existing_primary_on_different_branch.snap b/tests/snapshots/integration__integration_tests__switch__switch_to_existing_primary_on_different_branch.snap
index fe093d044..1db6c3782 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_to_existing_primary_on_different_branch.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_to_existing_primary_on_different_branch.snap
@@ -21,7 +21,7 @@ info:
success: true
exit_code: 0
----- stdout -----
-✅ Switched to worktree for existing-branch at [WORKTREE_EXISTING_BRANCH]
-💡 To enable automatic cd, run: wt config shell install
+🟡 Worktree for existing-branch at [WORKTREE_EXISTING_BRANCH]; cannot cd (no shell integration)
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_with_base.snap b/tests/snapshots/integration__integration_tests__switch__switch_with_base.snap
index 037085188..1f4e02834 100644
--- a/tests/snapshots/integration__integration_tests__switch__switch_with_base.snap
+++ b/tests/snapshots/integration__integration_tests__switch__switch_with_base.snap
@@ -25,6 +25,6 @@ success: true
exit_code: 0
----- stdout -----
✅ Created new worktree for feature-with-base from main at [REPO].feature-with-base
-💡 To enable automatic cd, run: wt config shell install
+💡 Run `wt config shell install` to enable automatic cd
----- stderr -----