terminal
terminal copied to clipboard
Version: 1.20.10572.0 reopens last tabs whenever it feels like it
Windows Terminal version
Version: 1.20.10572.0
Windows build number
Version 10.0.22631 Build 22631
Other Software
No response
Steps to reproduce
Open terminal preview. Open several tabs. Restart computer either before or after you close down Terminal. Wonder if it'll restore windows or it won't.
Expected Behavior
Do what the option says: reopen tabs from last session.
Actual Behavior
randomly opens last session tabs whenever it feels like it. No option to save my own and restore manually, I'm just living at the mercy of my own (removed expletive to comply with Code of Conduct) computer. It's great.
Please adhere to this repository’s Code of Conduct when you are reporting issues.
Sure thing. Was it "d***" that upset you?
"damn" is not a problem, your post is simply just too sarcastic. For what reason? I'd understand it if we had done something to offend you, but it's just a bug in the application. (Edit: To be clear, it's not a big deal. We all use sarcasm after all and there's no reason for you to edit it now. It's just that it'd be more productive if you didn't do it again.)
In any case, we're already aware about this issue and still collecting information when and why it happens. It's likely a race condition during shutdown or something similar, which is why it seems "random". My current theory is that it only happens if you have more than one window open.
Got it.
Your current theory matches what I experienced about a year ago (don't remember version) when I curbed my behavior to have more than 1 terminal window open before I close it. So this bug also happens when a single window with multiple tabs is open.
I think I made it happen once or twice when I was trying to reproduce it by killing the process from Process Hacker.
If I were to posit a theory: I'm guessing you've got some other CLI process that starts at startup. The OS starts that process up, and it picks Terminal as the default terminal handler, and starts the Terminal. Then, when the Terminal starts, it also starts up all the other windows for itself.
Now I'm guessing that the reason why sometimes this doesn't happen is along the lines of #17179 - sometimes, the window state isn't getting persisted if you just straight shutdown the PC.