WSL tmux screen scrambled when powershell.exe stderr redirected #14231

Open
opened 2026-01-31 04:04:30 +00:00 by claunia · 0 comments
Owner

Originally created by @wedaly on GitHub (Jun 15, 2021).

Windows Terminal version (or Windows build number)

1.8.1521.0

Other Software

WSL2
Ubuntu 20.04
tmux 3.0a
powershell.exe (major: 5, minor: 1, build: 19041, revision: 1023)

Steps to reproduce

In Windows Terminal under WSL2 Ubuntu 20.04:

  1. Start a new tmux session: tmux new -s default
  2. Run powershell.exe Write-Host 'hello' 2> /dev/null
  3. Type: Ctrl-B, then :split-window -h to split the tmux window.
  4. The display is garbled (see screenshot below).

After closing and opening Windows terminal, the display returns to normal. I found that I needed to exit and start a new tmux session to reproduce the issue.

The issue occurs ONLY when redirecting stderr from powershell.exe. If I remove the redirection, the issue doesn't happen.

Expected Behavior

Tmux displays two panes with a separator, and "hello world" from powershell.exe is displayed in the left pane. It should look like this:

image

Actual Behavior

Tmux display is garbled (see screenshot) until closing and reopening Windows Terminal.

image

Originally created by @wedaly on GitHub (Jun 15, 2021). ### Windows Terminal version (or Windows build number) 1.8.1521.0 ### Other Software WSL2 Ubuntu 20.04 tmux 3.0a powershell.exe (major: 5, minor: 1, build: 19041, revision: 1023) ### Steps to reproduce In Windows Terminal under WSL2 Ubuntu 20.04: 1. Start a new tmux session: `tmux new -s default` 2. Run `powershell.exe Write-Host 'hello' 2> /dev/null` 3. Type: Ctrl-B, then `:split-window -h` to split the tmux window. 4. The display is garbled (see screenshot below). After closing and opening Windows terminal, the display returns to normal. I found that I needed to exit and start a new tmux session to reproduce the issue. The issue occurs ONLY when redirecting stderr from powershell.exe. If I remove the redirection, the issue doesn't happen. ### Expected Behavior Tmux displays two panes with a separator, and "hello world" from powershell.exe is displayed in the left pane. It should look like this: ![image](https://user-images.githubusercontent.com/2948394/121993928-30d54a00-cd59-11eb-83c1-bc842fa44ead.png) ### Actual Behavior Tmux display is garbled (see screenshot) until closing and reopening Windows Terminal. ![image](https://user-images.githubusercontent.com/2948394/121993873-18652f80-cd59-11eb-8a07-b57a005b8713.png)
claunia added the Resolution-ExternalNeeds-Tag-Fix labels 2026-01-31 04:04:30 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14231