Description
Windows Terminal version
1.18.3181.0
Windows build number
10.0.19045.0
Other Software
No response
Steps to reproduce
- In Terminal settings,
Default terminal application
is Windows Terminal,Launch on machine startup
is On,When terminal starts
is set to Open windows from a previous session, andNew instance behaviour
to Create a new window.
Expected Behavior
My expectation would be that restoration of the previous session should apply only to the first Terminal instance (be it at machine startup or subsequently). Any further explicitly opened instances should open a tab with the default profile, whereas any instances opened to house an application that was launched explicitly should simply have a single tab for that application.
Actual Behavior
Initial startup is as expected (for the most part, see caveat below), however I'm seeing strange behaviour following that. With a single instance of Terminal open, if I attempt to launch any console application (cmd.exe
, PS
, or a console program launched via Visual Studio debugger), that application will open in a new Terminal window as expected, but alongside it a further Terminal window will be opened populated with tabs based on the prior session (so to clarify, I end up with 3 windows: the original session, a duplication of it, and the opened application).
- The above does not occur when explicitly opening Terminal.
- The above does not occur when I already have more than a single Terminal session open.
Regarding above noted caveat. It's not clear exactly how Terminal decides/updates what constitutes the previous session, but it seems far too easy for what I want to be considered my previous session to get replaced. Perhaps it's just based on the last window to be closed down? I really need some way to mark my 'main' session so that I don't end up losing the layout as a result of having at some point opened a secondary session. In particular, the fact that a session resulting from a request to open cmd.exe
or similar directly can end up overwriting my Terminal layout restoration seems wrong.