Version: 1.20.10572.0 reopens last tabs whenever it feels like it #21705

Closed
opened 2026-01-31 07:52:36 +00:00 by claunia · 5 comments
Owner

Originally created by @working-name on GitHub (May 12, 2024).

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.
fucking-microsoft-again

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.

Originally created by @working-name on GitHub (May 12, 2024). ### 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. ![fucking-microsoft-again](https://github.com/microsoft/terminal/assets/16505052/ee7a2399-92ab-4300-8ed1-f9b578e2d3c3) ### 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.
claunia added the Issue-BugIn-PRNeeds-Tag-FixProduct-TerminalArea-Windowing labels 2026-01-31 07:52:37 +00:00
Author
Owner

@DHowett commented on GitHub (May 12, 2024):

Please adhere to this repository’s Code of Conduct when you are reporting issues.

@DHowett commented on GitHub (May 12, 2024): Please adhere to this repository’s Code of Conduct when you are reporting issues.
Author
Owner

@working-name commented on GitHub (May 12, 2024):

Sure thing. Was it "d***" that upset you?

@working-name commented on GitHub (May 12, 2024): Sure thing. Was it "d***" that upset you?
Author
Owner

@lhecker commented on GitHub (May 12, 2024):

"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.

@lhecker commented on GitHub (May 12, 2024): "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.
Author
Owner

@working-name commented on GitHub (May 13, 2024):

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.

@working-name commented on GitHub (May 13, 2024): 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](https://processhacker.sourceforge.io/).
Author
Owner

@zadjii-msft commented on GitHub (May 13, 2024):

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.

@zadjii-msft commented on GitHub (May 13, 2024): 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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21705