Windows Terminal as default Console Host + Resume Issues #21094

Open
opened 2026-01-31 07:32:58 +00:00 by claunia · 0 comments
Owner

Originally created by @ForbiddenEra on GitHub (Jan 13, 2024).

Originally assigned to: @zadjii-msft on GitHub.

Windows Terminal version

1.19.3172.0 (Windows Store Preview)

Windows build number

10.0.19045.3570

Other Software

C:\Users\forbiddenera>ssh -V
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2

C:\Users\forbiddenera>wsl -v
WSL version: 2.0.9.0 (pretty sure I originally installed w/Add/Remove Features but it now shows up as installed on Windows Store)
Kernel version: 5.15.133.1-1
WSLg version: 1.0.59
MSRDC version: 1.2.4677
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.3570

Steps to reproduce

I've experienced more than a few issues that seem to be related to using Windows Terminal as the default console host and especially relate to the resumption features.

Here, I'll detail the two main issues I seem to experience the most often:

  1. Opening a command prompt often (but I think not always) opens a separate process and will resume a previous session, even if that session has already been resumed (and is even still open). This issue also happens in other cases, such as when any program opens/spawns a console window itself for whatever reason.
    1.1 - Have a Windows Terminal session running; for me to reproduce just now, I had one window open with multiple (SSH, WSL2) tabs. This session and it's tabs, in my case, was restored from a previous session when first opening Windows Terminal. You will need to have a previous session to resume from to reproduce.
    1.2 - Try to open a command prompt in some typical ways such as Start->Run->cmd.exe or Win+X->Command Prompt (Note: I am of course aware that Command Prompt (Admin) opens a separate Admin-owned process)
    1.3 - The command prompt opens as expected but also creates a separate Windows Terminal process (which on it's own wouldn't be terrible if not ideal) and also opens a second window containing all the tabs from the resumed session.

  2. This one may seem a little application specific but could affect many applications beyond the case where I ran into it. In my case, the application was the Furmark 2 beta but I can imagine this being a huge issue for anyone doing any sort of crypto mining as those are basically always console apps and are probably more likely to cause crashes/restarts than most apps AND are more likely to be left unattended.
    2.1 - Run Furmark 2 (or probably any app that launches a console) and then have your system crash (in my case, I'm using a spare lower wattage PSU while my main one is RMA'd and Furmark triggered OCP while running causing the system to shutdown) or forcefully shutdown/reboot.
    2.2 - System reboots, login and Windows Terminal restores it's session.
    2.3 - Furmark 2 now starts running again, potentially causing a crash and endless boot loop unless the user intervenes.

I have Windows Terminal set to launch on startup and resume it's session and this is a lovely feature as my work entails having like 10+ terminals open all the time and having to re-open, re-connect and re-arrange all the windows and tabs anytime I reboot (or am forced to reboot) is a huge pain and having this feature (plus browsers and other apps nowadays) has actually made me a lot less reboot-averse; thus disabling it isn't really ideal.

The second issue I have also reported to the Furmark team so they can potentially work around it but that doesn't account for all other console software that could potentially crash causing a reboot.

The first issue, I've had instances where I've literally ended up with like 4-5 Windows Terminal instances all resuming with their 10+ tabs each, in fact it's triggered security warnings when it does it and suddenly I've got like 10 SSH terminals open to one host as it's determined well outside what ML deems normal usage.

Expected Behavior

  1. A session shouldn't resume in when a second Windows Terminal process launches after it's been resumed already.
  2. A session shouldn't resume at least a tab/app which caused a crash/reboot of Windows Terminal or the system in general. I'm not sure how well this could be implemented but I don't think many would object to Windows Terminal prompting and asking/warning if Windows Terminal had not been closed properly (due to Windows Terminal crashing, Windows crashing, power outage, random reboot, whatever) or even not resuming the session after a crash and/or perhaps not launching on login/system startup after a system crash.

Actual Behavior

I hit Win+X->Command Prompt and got a new Window with the command prompt and then also a second window which was duplicated the session I already had open in Windows Terminal:
image

Originally created by @ForbiddenEra on GitHub (Jan 13, 2024). Originally assigned to: @zadjii-msft on GitHub. ### Windows Terminal version 1.19.3172.0 (Windows Store Preview) ### Windows build number 10.0.19045.3570 ### Other Software C:\Users\forbiddenera>ssh -V OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 C:\Users\forbiddenera>wsl -v WSL version: 2.0.9.0 (pretty sure I originally installed w/Add/Remove Features but it now shows up as installed on Windows Store) Kernel version: 5.15.133.1-1 WSLg version: 1.0.59 MSRDC version: 1.2.4677 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.19045.3570 ### Steps to reproduce I've experienced more than a few issues that seem to be related to using Windows Terminal as the default console host and especially relate to the resumption features. Here, I'll detail the two main issues I seem to experience the most often: 1. Opening a command prompt often (but I think not always) opens a separate process and will resume a previous session, even if that session has already been resumed (and is even still open). This issue also happens in other cases, such as when any program opens/spawns a console window itself for whatever reason. 1.1 - Have a Windows Terminal session running; for me to reproduce just now, I had one window open with multiple (SSH, WSL2) tabs. This session and it's tabs, in my case, was restored from a previous session when first opening Windows Terminal. You will need to have a previous session to resume from to reproduce. 1.2 - Try to open a command prompt in some typical ways such as `Start`->`Run`->`cmd.exe` or `Win+X`->`Command Prompt` (Note: I am of course aware that `Command Prompt (Admin)` opens a separate Admin-owned process) 1.3 - The command prompt opens as expected but also creates a separate Windows Terminal process (which on it's own wouldn't be terrible if not ideal) and also opens a second window containing all the tabs from the resumed session. 2. This one may seem a little application specific but could affect many applications beyond the case where I ran into it. In my case, the application was the Furmark 2 beta but I can imagine this being a huge issue for anyone doing any sort of crypto mining as those are basically always console apps and are probably more likely to cause crashes/restarts than most apps AND are more likely to be left unattended. 2.1 - Run Furmark 2 (or probably any app that launches a console) and then have your system crash (in my case, I'm using a spare lower wattage PSU while my main one is RMA'd and Furmark triggered OCP while running causing the system to shutdown) or forcefully shutdown/reboot. 2.2 - System reboots, login and Windows Terminal restores it's session. 2.3 - Furmark 2 now starts running again, potentially causing a crash and endless boot loop unless the user intervenes. I have Windows Terminal set to launch on startup and resume it's session and this is a lovely feature as my work entails having like 10+ terminals open all the time and having to re-open, re-connect and re-arrange all the windows and tabs anytime I reboot (or am forced to reboot) is a huge pain and having this feature (plus browsers and other apps nowadays) has actually made me a lot less reboot-averse; thus disabling it isn't really ideal. The second issue I have also reported to the Furmark team so they can potentially work around it but that doesn't account for all other console software that could potentially crash causing a reboot. The first issue, I've had instances where I've literally ended up with like 4-5 Windows Terminal instances all resuming with their 10+ tabs each, in fact it's triggered security warnings when it does it and suddenly I've got like 10 SSH terminals open to one host as it's determined well outside what ML deems normal usage. ### Expected Behavior 1. A session shouldn't resume in when a second Windows Terminal process launches after it's been resumed already. 2. A session shouldn't resume at least a tab/app which caused a crash/reboot of Windows Terminal or the system in general. I'm not sure how well this could be implemented but I don't think many would object to Windows Terminal prompting and asking/warning if Windows Terminal had not been closed properly (due to Windows Terminal crashing, Windows crashing, power outage, random reboot, whatever) or even not resuming the session after a crash and/or perhaps not launching on login/system startup after a system crash. ### Actual Behavior I hit `Win+X`->`Command Prompt` and got a new Window with the command prompt and then also a second window which was duplicated the session I already had open in Windows Terminal: ![image](https://github.com/microsoft/terminal/assets/7980490/433afa00-a216-4e9b-baef-188e411aff16)
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 07:32:58 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21094