Terminal keeps disappearing when laptop sleeps #18880

Closed
opened 2026-01-31 06:27:00 +00:00 by claunia · 8 comments
Owner

Originally created by @AravindhKumarSivaramakrishnan on GitHub (Nov 12, 2022).

Windows Terminal version

1.15.2875.0

Windows build number

10.0.22000.1098

Other Software

No response

Steps to reproduce

Open terminal and let the computer to sleep off and once woken up, the terminal will vanish.
Same behavior with battery and charger connected.

Note: This issue has started with the recent windows update.

Expected Behavior

Terminal should persist the state and behavior and not get closed.

Actual Behavior

Terminal seems to be missing/vanished, process seems to be running sometime (few mins even when the Terminal is missing) in background but eventually stops in some time.

Originally created by @AravindhKumarSivaramakrishnan on GitHub (Nov 12, 2022). ### Windows Terminal version 1.15.2875.0 ### Windows build number 10.0.22000.1098 ### Other Software _No response_ ### Steps to reproduce Open terminal and let the computer to sleep off and once woken up, the terminal will vanish. Same behavior with battery and charger connected. Note: This issue has started with the recent windows update. ### Expected Behavior Terminal should persist the state and behavior and not get closed. ### Actual Behavior Terminal seems to be missing/vanished, process seems to be running sometime (few mins even when the Terminal is missing) in background but eventually stops in some time.
claunia added the Needs-TriageIssue-BugNeeds-Author-FeedbackNo-Recent-Activity labels 2026-01-31 06:27:01 +00:00
Author
Owner

@lhecker commented on GitHub (Nov 15, 2022):

Does the terminal disappear every single time you sleep or only sometimes? Does your device need to sleep for a long time for the terminal to disappear?

@lhecker commented on GitHub (Nov 15, 2022): Does the terminal disappear every single time you sleep or only sometimes? Does your device need to sleep for a long time for the terminal to disappear?
Author
Owner

@zadjii-msft commented on GitHub (Nov 15, 2022):

Do you see any events in Event Viewer ala "‎The power manager has not requested the deletion of all entries‎" / "‎The power manager has requested the deletion of all entries‎"/?

See also #12513.

Can you try setting "closeOnExit": "never" in the settings? Maybe pwsh.exe is crashing, exiting, causing the Terminal to "crash".

It's also possible that the Store may have noticed that there was an update available for the Terminal, and chose to update it for you right as it was going to sleep / resuming from sleep. If this happens literally every sleep, then we can probably rule this out.

@zadjii-msft commented on GitHub (Nov 15, 2022): Do you see any events in Event Viewer ala "‎The power manager has not requested the deletion of all entries‎" / "‎The power manager has requested the deletion of all entries‎"/? See also #12513. Can you try setting [`"closeOnExit": "never"`](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-advanced#profile-termination-behavior) in the settings? Maybe `pwsh.exe` is crashing, exiting, causing the Terminal to "crash". It's also possible that the Store may have noticed that there was an update available for the Terminal, and chose to update it for you right as it was going to sleep / resuming from sleep. If this happens literally every sleep, then we can probably rule this out.
Author
Owner

@ghost commented on GitHub (Nov 19, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Nov 19, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@AravindhKumarSivaramakrishnan commented on GitHub (Nov 20, 2022):

Does the terminal disappear every single time you sleep or only sometimes? Does your device need to sleep for a long time for the terminal to disappear?

It only happens when the sleep is longer then 4 to 5 mins, few mins in sleep does not kill the terminal

@AravindhKumarSivaramakrishnan commented on GitHub (Nov 20, 2022): > Does the terminal disappear every single time you sleep or only sometimes? Does your device need to sleep for a long time for the terminal to disappear? It only happens when the sleep is longer then 4 to 5 mins, few mins in sleep does not kill the terminal
Author
Owner

@AravindhKumarSivaramakrishnan commented on GitHub (Nov 20, 2022):

Do you see any events in Event Viewer ala "‎The power manager has not requested the deletion of all entries‎" / "‎The power manager has requested the deletion of all entries‎"/?

See also #12513.

Can you try setting "closeOnExit": "never" in the settings? Maybe pwsh.exe is crashing, exiting, causing the Terminal to "crash".

It's also possible that the Store may have noticed that there was an update available for the Terminal, and chose to update it for you right as it was going to sleep / resuming from sleep. If this happens literally every sleep, then we can probably rule this out.

Tried "closeOnExit": "never", there is no change in the behavior and also there is no update to Terminal available in store and the issue literally happens for every sleep but only when a process is running (let's say you run an angular app or any process that runs longer). When the terminal is open without any process running, it seems to remain alive.

Checked the Event Logs, nothing related to Terminal or power manager.

@AravindhKumarSivaramakrishnan commented on GitHub (Nov 20, 2022): > Do you see any events in Event Viewer ala "‎The power manager has not requested the deletion of all entries‎" / "‎The power manager has requested the deletion of all entries‎"/? > > See also #12513. > > Can you try setting [`"closeOnExit": "never"`](https://docs.microsoft.com/en-us/windows/terminal/customize-settings/profile-advanced#profile-termination-behavior) in the settings? Maybe `pwsh.exe` is crashing, exiting, causing the Terminal to "crash". > > It's also possible that the Store may have noticed that there was an update available for the Terminal, and chose to update it for you right as it was going to sleep / resuming from sleep. If this happens literally every sleep, then we can probably rule this out. Tried `"closeOnExit": "never"`, there is no change in the behavior and also there is no update to Terminal available in store and the issue literally happens for every sleep but only when a process is running (let's say you run an angular app or any process that runs longer). When the terminal is open without any process running, it seems to remain alive. Checked the Event Logs, nothing related to Terminal or power manager.
Author
Owner

@carlos-zamora commented on GitHub (Dec 7, 2022):

We'd love to get some additional information. Would you mind filing this in feedback hub?

/feedback

@carlos-zamora commented on GitHub (Dec 7, 2022): We'd love to get some additional information. Would you mind filing this in feedback hub? /feedback
Author
Owner

@ghost commented on GitHub (Dec 7, 2022):

Hi there!

Can you please send us feedback with the Feedback Hub with this issue? Make sure to click the "Start recording" button, then reproduce the issue before submitting the feedback. Once it's submitted, paste the link here so we can more easily find your crash information on the back end?

Thanks!

image

image

image

@ghost commented on GitHub (Dec 7, 2022): Hi there!<br><br>Can you please send us feedback with the [Feedback Hub](https://support.microsoft.com/en-us/windows/send-feedback-to-microsoft-with-the-feedback-hub-app-f59187f8-8739-22d6-ba93-f66612949332) with this issue? Make sure to click the "Start recording" button, then reproduce the issue before submitting the feedback. Once it's submitted, paste the link here so we can more easily find your crash information on the back end?<br><br>Thanks!<br><br>![image](https://user-images.githubusercontent.com/18356694/140811502-a068f78b-89d2-4587-925a-73e19652b830.png)<br><br>![image](https://user-images.githubusercontent.com/18356694/140811557-cdc22a0f-fa6a-4f6a-953e-73b51f5548a3.png)<br><br>![image](https://user-images.githubusercontent.com/18221333/62478649-6de55400-b760-11e9-806e-5aab7e085a9f.png)
Author
Owner

@ghost commented on GitHub (Dec 12, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Dec 12, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18880