Process keeps running in background after closing the terminal and it prevents Terminal from openning again #23131

Closed
opened 2026-01-31 08:33:17 +00:00 by claunia · 6 comments
Owner

Originally created by @elie-g on GitHub (Apr 9, 2025).

Windows Terminal version

1.22.10731.0

Windows build number

Microsoft Windows [version 10.0.26100.3476]

Steps to reproduce

Open a terminal and close the window (all tabs).

Expected Behavior

The terminal and all it's processes are terminated when the terminal is closed.

Actual Behavior

After closing the terminal, the terminal Window closes but the RuntimeBroker and WindowsTerminal.exe processes keeps running in the background. This prevents me from openning another terminal. I have to kill the processes before I can open a terminal again.

Originally created by @elie-g on GitHub (Apr 9, 2025). ### Windows Terminal version _1.22.10731.0_ ### Windows build number _Microsoft Windows [version 10.0.26100.3476]_ ### Steps to reproduce Open a terminal and close the window (all tabs). ### Expected Behavior The terminal and all it's processes are terminated when the terminal is closed. ### Actual Behavior After closing the terminal, the terminal Window closes but the `RuntimeBroker` and `WindowsTerminal.exe` processes keeps running in the background. This prevents me from openning another terminal. I have to kill the processes before I can open a terminal again.
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 08:33:17 +00:00
Author
Owner

@DHowett commented on GitHub (Apr 9, 2025):

Thanks for reporting!

Can you share your settings.json/?

@DHowett commented on GitHub (Apr 9, 2025): Thanks for reporting! Can you share your `settings.json`/?
Author
Owner

@Zeroes1 commented on GitHub (Apr 9, 2025):

@elie-g may be?

Image

@Zeroes1 commented on GitHub (Apr 9, 2025): @elie-g may be? ![Image](https://github.com/user-attachments/assets/5f6d5b2c-d152-45ad-a27e-88483c9e9680)
Author
Owner

@Bouts2019 commented on GitHub (Apr 10, 2025):

same, open the second terminal window will back to the old console window

@Bouts2019 commented on GitHub (Apr 10, 2025): same, open the second terminal window will back to the old console window
Author
Owner

@elie-g commented on GitHub (Apr 11, 2025):

{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "actions": 
    [
        {
            "command": 
            {
                "action": "copy",
                "singleLine": false
            },
            "id": "User.copy.644BA8F2"
        },
        {
            "command": "paste",
            "id": "User.paste"
        },
        {
            "command": 
            {
                "action": "splitPane",
                "split": "auto",
                "splitMode": "duplicate"
            },
            "id": "User.splitPane.A6751878"
        },
        {
            "command": "find",
            "id": "User.find"
        }
    ],
    "alwaysShowNotificationIcon": false,
    "compatibility.allowHeadless": true,
    "copyFormatting": "none",
    "copyOnSelect": false,
    "defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
    "keybindings": 
    [
        {
            "id": "User.copy.644BA8F2",
            "keys": "ctrl+c"
        },
        {
            "id": "User.find",
            "keys": "ctrl+shift+f"
        },
        {
            "id": "User.paste",
            "keys": "ctrl+v"
        },
        {
            "id": "User.splitPane.A6751878",
            "keys": "alt+shift+d"
        }
    ],
    "language": "en-US",
    "minimizeToNotificationArea": false,
    "newTabMenu": 
    [
        {
            "type": "remainingProfiles"
        }
    ],
    "profiles": 
    {
        "defaults": 
        {
            "adjustIndistinguishableColors": "always",
            "font": 
            {
                "cellHeight": "1.2",
                "face": "Fira Mono",
                "size": 8,
                "weight": "light"
            },
            "historySize": 99999,
            "opacity": 90,
            "pathTranslationStyle": "none",
            "showMarksOnScrollbar": true,
            "useAcrylic": false
        },
        "list": 
        [
            {
                "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "hidden": false,
                "name": "Windows PowerShell"
            },
            {
                "commandline": "%SystemRoot%\\System32\\cmd.exe",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "hidden": false,
                "name": "Invite de commandes"
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": true,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            },
            {
                "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}",
                "hidden": false,
                "name": "Git Bash",
                "pathTranslationStyle": "msys2",
                "source": "Git"
            }
        ]
    },
    "schemes": [],
    "tabWidthMode": "equal",
    "themes": [],
    "useAcrylicInTabRow": false,
    "windowingBehavior": "useExisting"
}
@elie-g commented on GitHub (Apr 11, 2025): ```json { "$help": "https://aka.ms/terminal-documentation", "$schema": "https://aka.ms/terminal-profiles-schema", "actions": [ { "command": { "action": "copy", "singleLine": false }, "id": "User.copy.644BA8F2" }, { "command": "paste", "id": "User.paste" }, { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "id": "User.splitPane.A6751878" }, { "command": "find", "id": "User.find" } ], "alwaysShowNotificationIcon": false, "compatibility.allowHeadless": true, "copyFormatting": "none", "copyOnSelect": false, "defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "keybindings": [ { "id": "User.copy.644BA8F2", "keys": "ctrl+c" }, { "id": "User.find", "keys": "ctrl+shift+f" }, { "id": "User.paste", "keys": "ctrl+v" }, { "id": "User.splitPane.A6751878", "keys": "alt+shift+d" } ], "language": "en-US", "minimizeToNotificationArea": false, "newTabMenu": [ { "type": "remainingProfiles" } ], "profiles": { "defaults": { "adjustIndistinguishableColors": "always", "font": { "cellHeight": "1.2", "face": "Fira Mono", "size": 8, "weight": "light" }, "historySize": 99999, "opacity": 90, "pathTranslationStyle": "none", "showMarksOnScrollbar": true, "useAcrylic": false }, "list": [ { "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", "hidden": false, "name": "Windows PowerShell" }, { "commandline": "%SystemRoot%\\System32\\cmd.exe", "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "hidden": false, "name": "Invite de commandes" }, { "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}", "hidden": true, "name": "Azure Cloud Shell", "source": "Windows.Terminal.Azure" }, { "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}", "hidden": false, "name": "Git Bash", "pathTranslationStyle": "msys2", "source": "Git" } ] }, "schemes": [], "tabWidthMode": "equal", "themes": [], "useAcrylicInTabRow": false, "windowingBehavior": "useExisting" } ```
Author
Owner

@elie-g commented on GitHub (Apr 11, 2025):

@Zeroes1 It doesn't change anything. I still have the same problem.

@elie-g commented on GitHub (Apr 11, 2025): @Zeroes1 It doesn't change anything. I still have the same problem.
Author
Owner

@DHowett commented on GitHub (Apr 14, 2025):

I noticed that you have this setting enabled:

    "compatibility.allowHeadless": true,

That setting allows Terminal to keep running in the background after you close it.

If you turn it off, Terminal should stop running in the background.

@DHowett commented on GitHub (Apr 14, 2025): I noticed that you have this setting enabled: ``` "compatibility.allowHeadless": true, ``` That setting allows Terminal to keep running in the background after you close it. If you turn it off, Terminal should stop running in the background.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23131