Some client app closes randomly after idle (even with sleep disabled) #21414

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

Originally created by @colin-heberling on GitHub (Mar 18, 2024).

Windows Terminal version

1.19.10573.0

Windows build number

10.0.19045.4046

Other Software

No response

Steps to reproduce

Don't know yet, sometimes it happens once every couple weeks, other times 2-3 times a week.

Expected Behavior

Terminal doesn't close or terminate unless I tell it to.

Actual Behavior

I have Terminal installed on 2 different desktop computers, one with Windows 10, the other with Windows 11.

  1. Sleep is disabled on both,
  2. power settings set to performance,
  3. advanced app settings set to 'always' for background permissions
  4. in advanced control panel settings for power options, made sure sleep and hibernate are set to never, 'put hard disk to sleep' set to never
  5. changed Terminal advanced profile options so that terminate behavior is set to 'never close automatically'

The error happens intermittently, and does not happen at the same time on both computers, suggesting that it is not related to Windows Store updates.

After applying change 5 listed above, Terminal doesn't close, but all sessions are still terminated with following error message:

[process exited with code 3221225786 (0xc000013a)] You can now close this terminal with Ctrl+D, or press Enter to restart.

Previous session processes are no longer running in background either.

Originally created by @colin-heberling on GitHub (Mar 18, 2024). ### Windows Terminal version 1.19.10573.0 ### Windows build number 10.0.19045.4046 ### Other Software _No response_ ### Steps to reproduce Don't know yet, sometimes it happens once every couple weeks, other times 2-3 times a week. ### Expected Behavior Terminal doesn't close or terminate unless I tell it to. ### Actual Behavior I have Terminal installed on 2 different desktop computers, one with Windows 10, the other with Windows 11. 1. Sleep is disabled on both, 2. power settings set to performance, 3. advanced app settings set to 'always' for background permissions 4. in advanced control panel settings for power options, made sure sleep and hibernate are set to never, 'put hard disk to sleep' set to never 5. changed Terminal advanced profile options so that terminate behavior is set to 'never close automatically' The error happens intermittently, and does not happen at the same time on both computers, suggesting that it is not related to Windows Store updates. After applying change 5 listed above, Terminal doesn't close, but all sessions are still terminated with following error message: `[process exited with code 3221225786 (0xc000013a)] You can now close this terminal with Ctrl+D, or press Enter to restart.` Previous session processes are no longer running in background either.
claunia added the Needs-TriageIssue-BugNeeds-Author-FeedbackNo-Recent-Activity labels 2026-01-31 07:43:59 +00:00
Author
Owner

@github-actions[bot] commented on GitHub (Mar 18, 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!

Closed similar issues:

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

@github-actions[bot] commented on GitHub (Mar 18, 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! ### Closed similar issues: - [Terminal crashes/closes/terminates after being idle for a while (#14655)](https://github.com/microsoft/terminal/issues/14655), similarity score: 0.87 - [Windows Terminal randomly closes. (#10522)](https://github.com/microsoft/terminal/issues/10522), similarity score: 0.76 - [Terminal closes itself (#2655)](https://github.com/microsoft/terminal/issues/2655), similarity score: 0.76 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

@zadjii-msft commented on GitHub (Mar 18, 2024):

What are you running as the command in your profiles/? The Terminal isn't crashing, so that's a good sign. But it seems like whatever client app you're running thinks it should be Ctrl+c'd?

Return value/code Description
0xC000013A
STATUS_CONTROL_C_EXIT
{Application Exit by CTRL+C} The application terminated as a result of a CTRL+C.
@zadjii-msft commented on GitHub (Mar 18, 2024): What are you running as the command in your profiles/? The Terminal isn't _crashing_, so that's a good sign. But it seems like whatever client app you're running thinks it should be Ctrl+c'd? Return value/code | Description -- | -- `0xC000013A`<br>`STATUS_CONTROL_C_EXIT` | {Application Exit by CTRL+C} The application terminated as a result of a CTRL+C.
Author
Owner

@colin-heberling commented on GitHub (Mar 18, 2024):

I'm usually running Ubuntu profiles, and Windows Command Prompt profiles. I don't recall inputting CTRL+C at all within Terminal, unless I've accidentally tried to use CTRL+C for copying text instead of right-clicking highlighted text, but since the error usually happens when I unlock my idle computer, I don't think that's the issue.

But before making the switch for Terminal termination behavior to 'never close automatically', the window for Terminal would just be gone after unlocking my screen after some time idle.

@colin-heberling commented on GitHub (Mar 18, 2024): I'm usually running Ubuntu profiles, and Windows Command Prompt profiles. I don't recall inputting CTRL+C at all within Terminal, unless I've accidentally tried to use CTRL+C for copying text instead of right-clicking highlighted text, but since the error usually happens when I unlock my idle computer, I don't think that's the issue. But before making the switch for Terminal termination behavior to 'never close automatically', the window for Terminal would just be gone after unlocking my screen after some time idle.
Author
Owner

@zadjii-msft commented on GitHub (Mar 19, 2024):

But before making the switch for Terminal termination behavior to 'never close automatically', the window for Terminal would just be gone after unlocking my screen after some time idle.

That makes sense. Basically what's happening is that the client process is dying for some reason (it thinks due to a ctrl+c, even if that's not true), and when the client process exits, the tab would close, and when the last tab closes, the terminal would close. Simple enough.

Now, the trick here is what's causing these ctrl+c's? I wouldn't think that would be related to any power plan thing. Maybe some other process or service is sending that signal to all console apps? That would be weird, for sure. And if it's happening to multiple tabs all at the same time, then it's not happening due to a key stroke getting broadcast (since in that case, the key would only arrive at the active tab). Hmm. I don't even know how I'd go about debugging that...

@zadjii-msft commented on GitHub (Mar 19, 2024): > But before making the switch for Terminal termination behavior to 'never close automatically', the window for Terminal would just be gone after unlocking my screen after some time idle. That makes sense. Basically what's happening is that the client process is dying for some reason (it thinks due to a ctrl+c, even if that's not true), and when the client process exits, the tab would close, and when the last tab closes, the terminal would close. Simple enough. Now, the trick here is _what's causing these ctrl+c's_? I wouldn't think that would be related to any power plan thing. Maybe some other process or service is sending that signal to all console apps? That would be weird, for sure. And if it's happening to multiple tabs all at the same time, then it's not happening due to a key stroke getting broadcast (since in that case, the key would only arrive at the active tab). Hmm. I don't even know how I'd go about debugging that...
Author
Owner

@zadjii-msft commented on GitHub (Mar 20, 2024):

(and in retrospect, that STATUS_CONTROL_C_EXIT error is for a bunch of different possible control events, not necessarily just Ctrl+C.)

A TimeTravel trace would work, but you'd need a consistent repro to have a shot at capturing that.

I guess one thought is - does this happen to CMD tabs? Or just Ubuntu ones? Maybe there's a chance that just WSL updating?

(note to self: it isn't OpenConsole crashing, that's a 259 error)

Were these tabs opened by opening them directly in the Terminal? Or by opening Command Prompt / Ubuntu directly/?

@zadjii-msft commented on GitHub (Mar 20, 2024): (and in retrospect, that `STATUS_CONTROL_C_EXIT` error is for a bunch of different possible control events, not necessarily just Ctrl+C.) A TimeTravel trace _would_ work, but you'd need a consistent repro to have a shot at capturing that. I guess one thought is - does this happen to CMD tabs? Or just Ubuntu ones? Maybe there's a chance that just WSL updating? (note to self: it isn't OpenConsole crashing, that's a `259` error) Were these tabs opened by opening them directly in the Terminal? Or by opening Command Prompt / Ubuntu directly/?
Author
Owner

@colin-heberling commented on GitHub (Mar 20, 2024):

This happens to my entire Terminal application, no matter which profiles I have in each tab. It's been a mixture of both Ubuntu and CMD, and I currently have it setup to open all Ubuntu and CMD instances into new tabs within my sole Terminal window. Previously before I setup that configuration if I had isolated windows for CMD, they wouldn't be affected by Terminal closing. I think isolated WSL windows were fine too, but I honestly can't remember.

So it seems to be a problem with Terminal itself, and the choice of profile or how they got there doesn't seem to matter.

@colin-heberling commented on GitHub (Mar 20, 2024): This happens to my entire Terminal application, no matter which profiles I have in each tab. It's been a mixture of both Ubuntu and CMD, and I currently have it setup to open all Ubuntu and CMD instances into new tabs within my sole Terminal window. Previously before I setup that configuration if I had isolated windows for CMD, they wouldn't be affected by Terminal closing. I think isolated WSL windows were fine too, but I honestly can't remember. So it seems to be a problem with Terminal itself, and the choice of profile or how they got there doesn't seem to matter.
Author
Owner

@zadjii-msft commented on GitHub (Mar 27, 2024):

Weird. Well, we really don't know how exactly to debug this. But we're hoping we might be able to find some crash dumps that might be relevant. Filing feedback, and linking it here, should point us in the direction of your crashes (even if it doesn't capture the crash itself)

/feedback

@zadjii-msft commented on GitHub (Mar 27, 2024): Weird. Well, we really don't know how exactly to debug this. But we're hoping we might be able to find some crash dumps that might be relevant. Filing feedback, and linking it here, should point us in the direction of your crashes (even if it doesn't capture the crash itself) /feedback
Author
Owner

@colin-heberling commented on GitHub (Mar 27, 2024):

Great, thank you. I haven't experienced this issue since I first opened this issue, so of course, due to the nature of the issue, I have no idea when it will occur again.

If and when it does occur again, what are the steps I should follow to file the feedback?

@colin-heberling commented on GitHub (Mar 27, 2024): Great, thank you. I haven't experienced this issue since I first opened this issue, so of course, due to the nature of the issue, I have no idea when it will occur again. If and when it does occur again, what are the steps I should follow to file the feedback?
Author
Owner

@ma-netint commented on GitHub (Apr 2, 2024):

Hello,
Encountered the same issue as well. Had multiple windows with multiple tabs running when I locked/disconnected. On logging in from a remote desktop the terminals were closed. WSL was still running.
There was a pending windows update but issue date doesn't corelate with last modified date for the terminal in the Microsoft Store.
Running terminal version 1.19.105730.0. Windows 10 build 19045.4046.

In case the pending update is related how can I disable automatic updates for just the terminal?

@ma-netint commented on GitHub (Apr 2, 2024): Hello, Encountered the same issue as well. Had multiple windows with multiple tabs running when I locked/disconnected. On logging in from a remote desktop the terminals were closed. WSL was still running. There was a pending windows update but issue date doesn't corelate with last modified date for the terminal in the Microsoft Store. Running terminal version 1.19.105730.0. Windows 10 build 19045.4046. In case the pending update is related how can I disable automatic updates for just the terminal?
Author
Owner

@zadjii-msft commented on GitHub (Apr 3, 2024):

hey bot where are you

<bot hat>

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


In case the pending update is related how can I disable automatic updates for just the terminal

Pretty sure that's impossible in Windows 10. In a more recent Windows 11 build, we actually do opt ourselves out of auto-updates while we're running.

@zadjii-msft commented on GitHub (Apr 3, 2024): _hey bot where are you_ \<bot hat> 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) ----- > In case the pending update is related how can I disable automatic updates for just the terminal Pretty sure that's impossible in Windows 10. In a more recent Windows 11 build, we actually do opt ourselves out of auto-updates while we're running.
Author
Owner

@colin-heberling commented on GitHub (Apr 8, 2024):

Fortunately I haven't had this issue reoccur again since I posted this issue. It's so sporadic that I'm not sure how I would record it. I'll post again if it happens again.

@colin-heberling commented on GitHub (Apr 8, 2024): Fortunately I haven't had this issue reoccur again since I posted this issue. It's so sporadic that I'm not sure how I would record it. I'll post again if it happens again.
Author
Owner

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

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.

@microsoft-github-policy-service[bot] commented on GitHub (Apr 14, 2024): 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**. <!-- 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#21414