Echoes DCS control sequences instead of ignoring it #23113

Closed
opened 2026-01-31 08:32:44 +00:00 by claunia · 4 comments
Owner

Originally created by @krobelus on GitHub (Apr 4, 2025).

Windows Terminal version

1.22.10731.0

Windows build number

10.0.19045.0

Other Software

No response

Steps to reproduce

  1. run bash (I tried both in WSL and SSH)
  2. run printf '\ePHELLO\e\\'

Expected Behavior

Nothing should be echoed, since this is a DCS string that has been supported for a while.
I confirmed that my build has the fix for #120 by running git merge-base --is-ancestor acac35023d12f194918a1af388c57b7ea6f0c388 v1.22.10731.0 && echo good.

Actual Behavior

The command echoes HELLO.

I believe that others have encountered this issue as well, which suggests it may be an actual issue in the code.
Still surprising -- because this must have worked previously, so it seems like this may have regressed?

Originally created by @krobelus on GitHub (Apr 4, 2025). ### Windows Terminal version 1.22.10731.0 ### Windows build number 10.0.19045.0 ### Other Software _No response_ ### Steps to reproduce 1. run bash (I tried both in WSL and SSH) 2. run `printf '\ePHELLO\e\\'` ### Expected Behavior Nothing should be echoed, since this is a DCS string that [has been supported for a while](https://github.com/microsoft/terminal/issues/120). I confirmed that my build has the fix for #120 by running `git merge-base --is-ancestor acac35023d12f194918a1af388c57b7ea6f0c388 v1.22.10731.0 && echo good`. ### Actual Behavior The command echoes `HELLO`. I believe that others have encountered this issue as well, which suggests it may be an actual issue in the code. Still surprising -- because this must have worked previously, so it seems like this may have regressed?
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 08:32:44 +00:00
Author
Owner

@DHowett commented on GitHub (Apr 4, 2025):

Curious! I'm not seeing the same behavior between 1.22 and 1.24.

Image

Image

Can you grab us some output from the debug tap?

@DHowett commented on GitHub (Apr 4, 2025): Curious! I'm not seeing the same behavior between 1.22 and 1.24. ![Image](https://github.com/user-attachments/assets/cb0987f9-ee75-437d-a2b0-ae00ca1da9fe) ![Image](https://github.com/user-attachments/assets/4b0c7835-1948-4cd9-a383-a9b11726cab8) Can you grab us some output from [the debug tap](https://github.com/microsoft/terminal/wiki/Troubleshooting-Tips#enabling-the-debug-tap)?
Author
Owner

@j4james commented on GitHub (Apr 5, 2025):

@DHowett Could this be once of those cases where we're starting up a conhost session from within another session, and the nested session is run on the inbox version of conhost? Since the OP is on Windows 10, that inbox conhost is going to be really old, and won't support DCS sequences.

I know this definitely happens to me when launching cmd.exe from within a wsl shell, but it doesn't seem to happen when starting wsl from a cmd shell (I thought it used to, but I may be misremembering that).

@krobelus It might be informative to check the DA1 response from within your bash shell, e.g. with something like this:

printf "\e[c"; read

That should give us some indication of the underlying conpty version.

@j4james commented on GitHub (Apr 5, 2025): @DHowett Could this be once of those cases where we're starting up a conhost session from within another session, and the nested session is run on the inbox version of conhost? Since the OP is on Windows 10, that inbox conhost is going to be really old, and won't support `DCS` sequences. I know this definitely happens to me when launching cmd.exe from within a wsl shell, but it doesn't seem to happen when starting wsl from a cmd shell (I thought it used to, but I may be misremembering that). @krobelus It might be informative to check the `DA1` response from within your bash shell, e.g. with something like this: ```bash printf "\e[c"; read ``` That should give us some indication of the underlying conpty version.
Author
Owner

@DHowett commented on GitHub (Apr 5, 2025):

@j4james oh that's an excellent thought, thanks!

@DHowett commented on GitHub (Apr 5, 2025): @j4james oh that's an excellent thought, thanks!
Author
Owner

@krobelus commented on GitHub (Apr 5, 2025):

Somehow WSL stopped working momentarily so I rebooted and now Windows terminal seems fixed.

The problem still exists on my version of ConHost (the one that sends a ^[[?1;0c primary DA response).
This means that I'll need to keep using a workaround in my app until this can reasonably be expected to be fixed.
I wonder when that will be, maybe in a few years. Will Windows 10 ConHost be fixed (before Windows 10 goes EOL in October)?

Is Windows 11 ConHost affected?
(I use this computer only for testing Windows-specific issues, which is why I didn't upgrade to Windows 11 yet, I guess I'll be able to test this myself.)

@krobelus commented on GitHub (Apr 5, 2025): Somehow WSL stopped working momentarily so I rebooted and now Windows terminal seems fixed. The problem still exists on my version of ConHost (the one that sends a `^[[?1;0c` primary DA response). This means that I'll need to keep using [a workaround in my app](https://github.com/kovidgoyal/kitty/issues/8201#issuecomment-2577432299) until this can reasonably be expected to be fixed. I wonder when that will be, maybe in a few years. Will Windows 10 ConHost be fixed (before Windows 10 goes EOL in October)? Is Windows 11 ConHost affected? (I use this computer only for testing Windows-specific issues, which is why I didn't upgrade to Windows 11 yet, I guess I'll be able to test this myself.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23113