Open windows from a previous session should not re-run processes or have ability to selectively stop that #21719

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

Originally created by @krwq on GitHub (May 16, 2024).

Windows Terminal version

1.19.11213.0

Windows build number

10.0.22631.3593

Other Software

cmd.exe with any app running as startup

Steps to reproduce

  • Enable Open windows from a previous session and optionally auto-start when logging in
  • Have any console app server running as auto-start (i.e. entry under HKCU/HKLM\Software\Microsoft\Windows\CurrentVersion\Run - in my case it directly points to the exe file)
  • wait until app loads
  • restart PC/re-log in
  • start Windows terminal (if not auto-starting)

Observe how app is re-run through both Windows Terminal and Windows - in case of i.e. https server it will frequently show message about port being in use in one of the instances

Expected Behavior

I'd expect either of following:

  • do not restore apps started as part of login
  • see only environment for the app (i.e. terminal could still open with all environmental variables but it would only have a prompt allowing me to start the app with pressing ENTER)
  • have ability to selectively not restore it (i.e. right click and checkbox: Ignore this process for session restore or similar)
  • any other way to prevent from

Actual Behavior

Two instances of the app are run - in some cases it will lead to crashes. If you keep on restarting and app doesn't close you will have incrementally more apps start

Originally created by @krwq on GitHub (May 16, 2024). ### Windows Terminal version 1.19.11213.0 ### Windows build number 10.0.22631.3593 ### Other Software cmd.exe with any app running as startup ### Steps to reproduce - Enable `Open windows from a previous session` and optionally auto-start when logging in - Have any console app server running as auto-start (i.e. entry under `HKCU/HKLM\Software\Microsoft\Windows\CurrentVersion\Run` - in my case it directly points to the exe file) - wait until app loads - restart PC/re-log in - start Windows terminal (if not auto-starting) Observe how app is re-run through both Windows Terminal and Windows - in case of i.e. https server it will frequently show message about port being in use in one of the instances ### Expected Behavior I'd expect either of following: - do not restore apps started as part of login - see only environment for the app (i.e. terminal could still open with all environmental variables but it would only have a prompt allowing me to start the app with pressing ENTER) - have ability to selectively not restore it (i.e. right click and checkbox: `Ignore this process for session restore` or similar) - any other way to prevent from ### Actual Behavior Two instances of the app are run - in some cases it will lead to crashes. If you keep on restarting and app doesn't close you will have incrementally more apps start
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 07:53:00 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (May 16, 2024):

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@github-actions[bot] commented on GitHub (May 16, 2024): Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! ### Open similar issues: - [Problems with session startup and resumption (#16487)](https://github.com/microsoft/terminal/issues/16487), similarity score: 0.80 ### Closed similar issues: - ["Open windows from a previous session" executes even if a window is open. (#16732)](https://github.com/microsoft/terminal/issues/16732), similarity score: 0.76 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@krwq commented on GitHub (May 16, 2024):

This looks like it might want to be addresses as part of https://github.com/microsoft/terminal/issues/16487 but will let maintainers decide if it's same or separate issue as this one is not about multiple instances of Windows terminal

@krwq commented on GitHub (May 16, 2024): This looks like it might want to be addresses as part of https://github.com/microsoft/terminal/issues/16487 but will let maintainers decide if it's same or separate issue as this one is not about multiple instances of Windows terminal
Author
Owner

@carlos-zamora commented on GitHub (Jul 3, 2024):

Thanks for filing! Yeah, some of the behaviors around this are non-intuitive. We'll be tracking it over there and marking this as a /dup of #16487.

@carlos-zamora commented on GitHub (Jul 3, 2024): Thanks for filing! Yeah, some of the behaviors around this are non-intuitive. We'll be tracking it over there and marking this as a /dup of #16487.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Jul 3, 2024):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@microsoft-github-policy-service[bot] commented on GitHub (Jul 3, 2024): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21719