Skip to content

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

Separate stdout/stderr in directive mode

Maximilian Roosd41a74108bb1
diff --git a/CLAUDE.md b/CLAUDE.md
index 74ab59b67..74a3d8c5b 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -111,24 +111,28 @@ println!("{INFO_EMOJI} Global Config: {bold}{}{bold:#}", path.display());
println!("{dim}Operation declined{dim:#}");
```
-### stdout vs stderr: Separation by Source
+### stdout vs stderr: Separation by Mode
-**Core Principle: Separate output by who generates it.**
+**Core Principle: Different separation in interactive vs directive mode.**
-- **stdout**: All worktrunk output (messages, directives, errors, warnings, progress)
-- **stderr**: All child process output (git, npm, user commands)
-- **Exception**: Interactive prompts use stderr to bypass shell wrapper's NUL-delimited parsing
+**Interactive mode:**
+- **stdout**: All worktrunk output (messages, errors, warnings, progress)
+- **stderr**: Child process output (git, npm, user commands) + interactive prompts
-```rust
-// ALL our output goes to stdout (including errors)
-println!("{ERROR_EMOJI} {ERROR}Branch already exists{ERROR:#}");
+**Directive mode (--internal flag for shell integration):**
+- **stdout**: Only directives (`__WORKTRUNK_CD__`, `__WORKTRUNK_EXEC__`) - NUL-terminated
+- **stderr**: All user-facing messages + child process output - streams in real-time
-// Interactive prompts go to stderr to bypass shell wrapper buffering
-eprint!("{HINT_EMOJI} Allow and remember? [y/N] ");
+Use the output system (`output::success()`, `output::progress()`, etc.) to handle both modes automatically. Never write directly to stdout/stderr in command code.
-// Redirect child processes to stderr
-let wrapped = format!("{{ {}; }} 1>&2", command);
-Command::new("sh").arg("-c").arg(&wrapped).status()?;
+```rust
+// ✅ GOOD - use output system (handles both modes)
+output::success("Branch created")?;
+output::change_directory(&path)?;
+
+// ❌ BAD - direct writes bypass output system
+println!("Branch created");
+writeln!(io::stderr(), "Progress...")?;
```
**Interactive prompts:** Flush stderr before blocking on stdin to prevent interleaving:
@@ -138,6 +142,12 @@ stderr().flush()?; // Ensures prompt is visible before blocking
io::stdin().read_line(&mut response)?;
```
+**Child processes:** Redirect stdout to stderr for deterministic ordering:
+```rust
+let wrapped = format!("{{ {}; }} 1>&2", command);
+Command::new("sh").arg("-c").arg(&wrapped).status()?;
+```
+
### Temporal Locality: Output Should Be Close to Operations
**Core Principle: Output should appear immediately adjacent to the operations they describe.**
diff --git a/src/commands/command_approval.rs b/src/commands/command_approval.rs
index ee8dee7a0..877ac99c1 100644
--- a/src/commands/command_approval.rs
+++ b/src/commands/command_approval.rs
@@ -84,8 +84,8 @@ fn prompt_for_batch_approval(commands: &[&Command], project_id: &str) -> std::io
let plural = if count == 1 { "" } else { "s" };
// CRITICAL: Flush stdout before writing to stderr to prevent stream interleaving
- // In directive mode, emits NUL to flush shell wrapper's read buffer
- // In interactive mode, just flushes normally
+ // In directive mode, flushes both stdout (directives) and stderr (messages)
+ // In interactive mode, flushes both stdout and stderr
crate::output::flush_for_stderr_prompt()?;
eprintln!();
diff --git a/src/commands/configure_shell.rs b/src/commands/configure_shell.rs
index 535e8dd92..bede63e8c 100644
--- a/src/commands/configure_shell.rs
+++ b/src/commands/configure_shell.rs
@@ -349,8 +349,8 @@ fn prompt_for_confirmation(results: &[ConfigureResult]) -> Result<bool, String>
use worktrunk::styling::{HINT_EMOJI, eprint, eprintln};
// CRITICAL: Flush stdout before writing to stderr to prevent stream interleaving
- // In directive mode, emits NUL to flush shell wrapper's read buffer
- // In interactive mode, just flushes normally
+ // In directive mode, flushes both stdout (directives) and stderr (messages)
+ // In interactive mode, flushes both stdout and stderr
crate::output::flush_for_stderr_prompt().map_err(|e| e.to_string())?;
// Interactive prompts go to stderr so they appear even when stdout is redirected
diff --git a/src/output/directive.rs b/src/output/directive.rs
index fef393c00..807db5183 100644
--- a/src/output/directive.rs
+++ b/src/output/directive.rs
@@ -10,16 +10,22 @@
//!
//! Running `wt switch --internal my-branch` outputs:
//!
+//! **stdout** (parsed by shell wrapper):
//! ```text
//! __WORKTRUNK_CD__/path/to/worktree\0
-//! Switched to worktree: my-branch\0
//! ```
//!
-//! The shell wrapper parses this output:
+//! **stderr** (streams directly to terminal):
+//! ```text
+//! ✅ Switched to worktree: my-branch
+//! ```
+//!
+//! The shell wrapper parses stdout:
//! - Lines starting with `__WORKTRUNK_CD__` trigger directory changes
//! - Lines starting with `__WORKTRUNK_EXEC__` trigger command execution
-//! - Other lines print normally to the user
-//! - All messages are NUL-terminated for reliable parsing
+//! - Directives are NUL-terminated for reliable parsing
+//!
+//! User-facing messages go to stderr for real-time streaming without buffering.
//!
//! This separation keeps the Rust binary focused on git logic while the shell
//! handles environment changes (cd, exec).
@@ -46,15 +52,15 @@ impl DirectiveOutput {
}
pub fn success(&mut self, message: String) -> io::Result<()> {
- // Success messages automatically include the ✅ emoji
- write!(io::stdout(), "{SUCCESS_EMOJI} {message}\0")?;
- io::stdout().flush()
+ // Success messages go to stderr for real-time streaming (not buffered by shell wrapper)
+ writeln!(io::stderr(), "{SUCCESS_EMOJI} {message}")?;
+ io::stderr().flush()
}
pub fn progress(&mut self, message: String) -> io::Result<()> {
- // Progress messages automatically include the 🔄 emoji
- write!(io::stdout(), "{PROGRESS_EMOJI} {message}\0")?;
- io::stdout().flush()
+ // Progress messages go to stderr for real-time streaming (not buffered by shell wrapper)
+ writeln!(io::stderr(), "{PROGRESS_EMOJI} {message}")?;
+ io::stderr().flush()
}
pub fn hint(&mut self, _message: String) -> io::Result<()> {
@@ -64,15 +70,15 @@ impl DirectiveOutput {
}
pub fn info(&mut self, message: String) -> io::Result<()> {
- // Info messages automatically include the ⚪ emoji
- write!(io::stdout(), "{INFO_EMOJI} {message}\0")?;
- io::stdout().flush()
+ // Info messages go to stderr for real-time streaming (not buffered by shell wrapper)
+ writeln!(io::stderr(), "{INFO_EMOJI} {message}")?;
+ io::stderr().flush()
}
pub fn warning(&mut self, message: String) -> io::Result<()> {
- // Warning messages automatically include the 🟡 emoji
- write!(io::stdout(), "{WARNING_EMOJI} {message}\0")?;
- io::stdout().flush()
+ // Warning messages go to stderr for real-time streaming (not buffered by shell wrapper)
+ writeln!(io::stderr(), "{WARNING_EMOJI} {message}")?;
+ io::stderr().flush()
}
#[cfg(unix)]
@@ -82,9 +88,9 @@ impl DirectiveOutput {
}
pub fn gutter(&mut self, content: String) -> io::Result<()> {
- // Gutter content has its own visual structure - print with NUL terminator
- write!(io::stdout(), "{content}\0")?;
- io::stdout().flush()
+ // Gutter content goes to stderr for real-time streaming (not buffered by shell wrapper)
+ write!(io::stderr(), "{content}")?;
+ io::stderr().flush()
}
pub fn change_directory(&mut self, path: &Path) -> io::Result<()> {
@@ -98,14 +104,15 @@ impl DirectiveOutput {
}
pub fn flush(&mut self) -> io::Result<()> {
- io::stdout().flush()
+ io::stdout().flush()?;
+ io::stderr().flush()
}
pub fn flush_for_stderr_prompt(&mut self) -> io::Result<()> {
- // In directive mode, emit NUL to flush buffered stdout through shell's read loop
- // The shell wrapper uses `while read -d '' chunk` which buffers until NUL arrives
- write!(io::stdout(), "\0")?;
- io::stdout().flush()
+ // In directive mode, flush both streams before showing stderr prompt
+ // Since messages now go to stderr, no NUL needed - just ensure everything is flushed
+ io::stdout().flush()?;
+ io::stderr().flush()
}
pub fn terminate_output(&mut self) -> io::Result<()> {
diff --git a/src/output/global.rs b/src/output/global.rs
index 8d0c650cf..07896e105 100644
--- a/src/output/global.rs
+++ b/src/output/global.rs
@@ -177,16 +177,15 @@ pub fn flush() -> io::Result<()> {
})
}
-/// Flush stdout before showing stderr prompt
+/// Flush streams before showing stderr prompt
///
-/// This is a special-purpose function for approval prompts that write to stderr.
-/// In directive mode, emits a NUL terminator to flush buffered stdout through the
-/// shell wrapper's `read -d ''` loop. In interactive mode, just flushes normally.
+/// This prevents stream interleaving. Interactive prompts write to stderr, so we must
+/// ensure all previous output is flushed first:
+/// - In directive mode: Flushes both stdout (directives) and stderr (messages)
+/// - In interactive mode: Flushes both stdout and stderr
///
-/// Context: The shell wrapper (templates/bash.sh) uses `while read -d '' chunk` to parse
-/// stdout. This buffers stdout until a NUL byte arrives. Without this NUL, previous
-/// stdout messages (like success) stay buffered while stderr (prompts) passes through,
-/// causing incorrect ordering.
+/// Note: With stderr separation (messages on stderr in directive mode), prompts
+/// naturally appear after messages without needing NUL terminators for synchronization.
pub fn flush_for_stderr_prompt() -> io::Result<()> {
OUTPUT_CONTEXT.with(|ctx| match &mut *ctx.borrow_mut() {
OutputHandler::Interactive(i) => i.flush_for_stderr_prompt(),
diff --git a/src/output/interactive.rs b/src/output/interactive.rs
index 458ad538e..a671102da 100644
--- a/src/output/interactive.rs
+++ b/src/output/interactive.rs
@@ -106,8 +106,9 @@ impl InteractiveOutput {
}
pub fn flush_for_stderr_prompt(&mut self) -> io::Result<()> {
- // In interactive mode, just flush normally - no NUL needed
- stdout().flush()
+ // In interactive mode, flush both streams before stderr prompt
+ stdout().flush()?;
+ stderr().flush()
}
pub fn terminate_output(&mut self) -> io::Result<()> {
diff --git a/src/output/mod.rs b/src/output/mod.rs
index 414c1ae5a..c038b43a8 100644
--- a/src/output/mod.rs
+++ b/src/output/mod.rs
@@ -51,10 +51,9 @@
//! ## Output Modes
//!
//! - **Interactive**: Colors, emojis, shell hints, direct command execution
-//! - **Directive**: Plain text with NUL-terminated directives for shell integration
-//! - `__WORKTRUNK_CD__<path>\0` - Change directory
-//! - `__WORKTRUNK_EXEC__<cmd>\0` - Execute command
-//! - `<message>\0` - Success message
+//! - **Directive**: Machine-readable directives on stdout, user messages on stderr
+//! - stdout (parsed by shell): `__WORKTRUNK_CD__<path>\0`, `__WORKTRUNK_EXEC__<cmd>\0`
+//! - stderr (streams to terminal): Success messages, progress updates, warnings
pub mod directive;
pub mod global;
diff --git a/tests/integration_tests/directives.rs b/tests/integration_tests/directives.rs
index 9705a08a8..2284e291f 100644
--- a/tests/integration_tests/directives.rs
+++ b/tests/integration_tests/directives.rs
@@ -86,7 +86,15 @@ fn test_remove_internal_directive() {
.arg("remove")
.current_dir(repo.root_path());
- assert_cmd_snapshot!(cmd, @"success: true\nexit_code: 0\n----- stdout -----\n🔄 \u{1b}[36mRemoving worktree...\u{1b}[0m\0✅ \u{1b}[32mAlready on default branch \u{1b}[1m\u{1b}[32mmain\u{1b}[0m\u{1b}[0m\0\n----- stderr -----");
+ assert_cmd_snapshot!(cmd, @r"
+ success: true
+ exit_code: 0
+ ----- stdout -----
+
+ ----- stderr -----
+ 🔄 Removing worktree...
+ ✅ Already on default branch main
+ ");
});
}
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__fish_multiline_command_execution.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__fish_multiline_command_execution.snap
index 5b94ebda1..fb66daf72 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__fish_multiline_command_execution.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__fish_multiline_command_execution.snap
@@ -5,7 +5,6 @@ expression: output.normalized()
✅ Created new worktree for fish-multiline from main at [TMPDIR]/test-repo.fish-multiline
🔄 Executing (--execute):
  echo 'line 1'; echo 'line 2'; echo 'line 3'
-
line 1
line 2
line 3
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 2f7008a56..39efe6e18 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
@@ -4,7 +4,6 @@ expression: output.normalized()
---
🔄 Running pre-merge check1:
  [WORKSPACE]/tests/fixtures/mixed-output.sh check1 3
-
[check1] stdout line 1
[check1] stderr line 1
[check1] stdout line 2
@@ -15,7 +14,6 @@ expression: output.normalized()
[check1] stderr complete
🔄 Running pre-merge check2:
  [WORKSPACE]/tests/fixtures/mixed-output.sh check2 3
-
[check2] stdout line 1
[check2] stderr line 1
[check2] stdout line 2
@@ -27,10 +25,8 @@ expression: output.normalized()
🔄 Merging 1 commit to main @ [HASH] (no commit/squash/rebase needed)
  * [HASH] (HEAD -> feature) Add feature
-
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
-
✅ Merged to main (1 commit, 1 file, +1)
🔄 Removing worktree & branch...
✅ Removed worktree & branch for feature, returned to primary at [TMPDIR]/test-repo
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 2f7008a56..39efe6e18 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
@@ -4,7 +4,6 @@ expression: output.normalized()
---
🔄 Running pre-merge check1:
  [WORKSPACE]/tests/fixtures/mixed-output.sh check1 3
-
[check1] stdout line 1
[check1] stderr line 1
[check1] stdout line 2
@@ -15,7 +14,6 @@ expression: output.normalized()
[check1] stderr complete
🔄 Running pre-merge check2:
  [WORKSPACE]/tests/fixtures/mixed-output.sh check2 3
-
[check2] stdout line 1
[check2] stderr line 1
[check2] stdout line 2
@@ -27,10 +25,8 @@ expression: output.normalized()
🔄 Merging 1 commit to main @ [HASH] (no commit/squash/rebase needed)
  * [HASH] (HEAD -> feature) Add feature
-
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
-
✅ Merged to main (1 commit, 1 file, +1)
🔄 Removing worktree & branch...
✅ Removed worktree & branch for feature, returned to primary at [TMPDIR]/test-repo
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap
index e948f19d8..1926e0a7c 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap
@@ -4,11 +4,9 @@ expression: output.normalized()
---
🔄 Running pre-merge format:
  echo '✓ Code formatting check passed'
-
✓ Code formatting check passed
🔄 Running pre-merge test:
  echo '✗ Test suite failed: 3 tests failing' && exit 1
-
✗ Test suite failed: 3 tests failing
❌ pre-merge command failed: test: exit status: 1
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap
index e948f19d8..1926e0a7c 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap
@@ -4,11 +4,9 @@ expression: output.normalized()
---
🔄 Running pre-merge format:
  echo '✓ Code formatting check passed'
-
✓ Code formatting check passed
🔄 Running pre-merge test:
  echo '✗ Test suite failed: 3 tests failing' && exit 1
-
✗ Test suite failed: 3 tests failing
❌ pre-merge command failed: test: exit status: 1
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 ead65e4d7..51f78d8d7 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
@@ -4,23 +4,18 @@ expression: output.normalized()
---
🔄 Running pre-merge format:
  echo '✓ Code formatting check passed'
-
✓ Code formatting check passed
🔄 Running pre-merge lint:
  echo '✓ Linting passed - no warnings'
-
✓ Linting passed - no warnings
🔄 Running pre-merge test:
  echo '✓ All 47 tests passed in 2.3s'
-
✓ All 47 tests passed in 2.3s
🔄 Merging 1 commit to main @ [HASH] (no commit/squash/rebase needed)
  * [HASH] (HEAD -> feature) Add feature
-
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
-
✅ Merged to main (1 commit, 1 file, +1)
🔄 Removing worktree & branch...
✅ Removed worktree & branch for feature, returned to primary at [TMPDIR]/test-repo
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 ead65e4d7..51f78d8d7 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
@@ -4,23 +4,18 @@ expression: output.normalized()
---
🔄 Running pre-merge format:
  echo '✓ Code formatting check passed'
-
✓ Code formatting check passed
🔄 Running pre-merge lint:
  echo '✓ Linting passed - no warnings'
-
✓ Linting passed - no warnings
🔄 Running pre-merge test:
  echo '✓ All 47 tests passed in 2.3s'
-
✓ All 47 tests passed in 2.3s
🔄 Merging 1 commit to main @ [HASH] (no commit/squash/rebase needed)
  * [HASH] (HEAD -> feature) Add feature
-
  feature.txt | 1 +
  1 file changed, 1 insertion(+)
-
✅ Merged to main (1 commit, 1 file, +1)
🔄 Removing worktree & branch...
✅ Removed worktree & branch for feature, returned to primary at [TMPDIR]/test-repo
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute.snap
index 668f0f036..4aca34336 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute.snap
@@ -5,5 +5,4 @@ expression: output.normalized()
✅ Created new worktree for test-exec from main at [TMPDIR]/test-repo.test-exec
🔄 Executing (--execute):
  echo executed
-
executed
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_through_wrapper.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_through_wrapper.snap
index 668f0f036..4aca34336 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_through_wrapper.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_through_wrapper.snap
@@ -5,5 +5,4 @@ expression: output.normalized()
✅ Created new worktree for test-exec from main at [TMPDIR]/test-repo.test-exec
🔄 Executing (--execute):
  echo executed
-
executed
diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap
index 856830a18..52a8a11b4 100644
--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap
+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks_zsh.snap
@@ -4,15 +4,12 @@ expression: output.normalized()
---
🔄 Running post-create:
  echo 'Installing dependencies...'
-
Installing dependencies...
🔄 Running post-create:
  echo 'Building project...'
-
Building project...
✅ Created new worktree for feature-hooks from main at [TMPDIR]/test-repo.feature-hooks
🔄 Running post-start server:
  echo 'Starting dev server on port 3000'
-
🔄 Running post-start watch:
  echo 'Watching for file changes'
diff --git a/tests/snapshots/integration__integration_tests__directives__merge_internal_no_remove.snap b/tests/snapshots/integration__integration_tests__directives__merge_internal_no_remove.snap
index cf4e0fd9b..5b71573e6 100644
Binary files a/tests/snapshots/integration__integration_tests__directives__merge_internal_no_remove.snap and b/tests/snapshots/integration__integration_tests__directives__merge_internal_no_remove.snap differ
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 fdc0cc771..718600edd 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__remove__remove_internal_mode.snap b/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap
index 33515a90d..59cdaff9b 100644
Binary files a/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap and b/tests/snapshots/integration__integration_tests__remove__remove_internal_mode.snap differ
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_existing_internal.snap b/tests/snapshots/integration__integration_tests__switch__switch_existing_internal.snap
index 440ac0853..8aa9d171d 100644
Binary files a/tests/snapshots/integration__integration_tests__switch__switch_existing_internal.snap and b/tests/snapshots/integration__integration_tests__switch__switch_existing_internal.snap differ
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_internal_mode.snap b/tests/snapshots/integration__integration_tests__switch__switch_internal_mode.snap
index 855fc85d3..34a1fd034 100644
Binary files a/tests/snapshots/integration__integration_tests__switch__switch_internal_mode.snap and b/tests/snapshots/integration__integration_tests__switch__switch_internal_mode.snap differ
diff --git a/tests/snapshots/integration__integration_tests__switch__switch_internal_with_execute.snap b/tests/snapshots/integration__integration_tests__switch__switch_internal_with_execute.snap
index 598ff1cf8..089781281 100644
Binary files a/tests/snapshots/integration__integration_tests__switch__switch_internal_with_execute.snap and b/tests/snapshots/integration__integration_tests__switch__switch_internal_with_execute.snap differ