Skip to content

[1.22] Terminal stops functioning after closing last window with "compatibility.allowHeadless" enabled and "windowingBehavior" set to "useExisting"/"useAnyExisting" #18827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
nickamante opened this issue Apr 23, 2025 · 4 comments
Assignees
Labels
Area-Windowing Window frame, quake mode, tearout Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal.

Comments

@nickamante
Copy link

nickamante commented Apr 23, 2025

Windows Terminal version

1.22.10730.0

Windows build number

10.0.26100 (Windows 11)
10.0.19045 (Windows 10)

Other Software

No response

Steps to reproduce

  • Enable Settings > Compatibility > Allow Windows Terminal to run in the background
  • Close all existing Terminal windows
  • Attempt to re-launch Terminal (directly via Start > Terminal or via Global Summon hotkey)
    • Terminal does not launch
  • Attempt to launch Command Prompt, Windows Powershell, Powershell 7 (x64)
    • Terminal does not launch; after ~30 seconds the non-terminal version of the app launches.

Expected Behavior

Terminal remains running in the background and launching new Terminal windows continues to work.

Actual Behavior

  • After closing the last window, WindowsTerminal.exe remains running in Task Manager.
  • If Appearance > Always display an icon in the notification area is enabled, left-clicking the icon or right-click Focus Terminal has no effect. Under Windows > the last window to be closed remains listed.
  • New terminal windows will not launch until the WindowsTerminal.exe process is killed in Task Manager.
  • Turning off Allow Windows Terminal to run in the background causes the WindowsTerminal.exe process to exit after the last window is closed and allows re-launch
@nickamante nickamante added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Apr 23, 2025
@DHowett DHowett added Area-Windowing Window frame, quake mode, tearout Severity-Crash Crashes are real bad news. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Issue-Bug It either shouldn't be doing this or needs an investigation. Severity-Crash Crashes are real bad news. Area-Windowing Window frame, quake mode, tearout labels Apr 23, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Apr 23, 2025
@DHowett DHowett added Issue-Bug It either shouldn't be doing this or needs an investigation. Severity-Crash Crashes are real bad news. Area-Windowing Window frame, quake mode, tearout labels Apr 23, 2025
@DHowett DHowett added this to the Terminal v1.24 milestone Apr 23, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Tag-Fix Doesn't match tag requirements label Apr 23, 2025
@carlos-zamora
Copy link
Member

carlos-zamora commented Apr 25, 2025

Hi @nickamante. I'm struggling to get a repro on this bug. I've been trying it out with the following parameters:

  • a clean settings.json and state.json, except "compatibility.allowHeadless": true, added to settings.json
  • WT Dev build of v1.22.10731.0 and WT Stable v1.22.10731.0

Could you share a copy of your settings.json and state.json please /? (Just in case) The state.json is stored right next to the settings.json.

Thanks in advance!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Apr 25, 2025
@carlos-zamora carlos-zamora added the Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. label Apr 25, 2025
@nickamante
Copy link
Author

Here you go - I've got the same issue on both my older Dell Windows 10 laptop and a brand new Windows 11 Lenovo. Aside from the out of the box software I've installed the following on the Lenovo machine (via winget): WSL/Ubuntu, Powershell 7, Gsudo, Git, TortoiseGit, Beyond Compare 5, OhMyPosh, Clink, GrepWin, Visual Studio Code, Firefox, Spotify. It's largely just dev/terminal focused apps at the point when I discovered the issue. I'd think it might be related to one of them, except Terminal fails to launch for all shells and yet the shells themselves have no issues once taking Terminal out of the picture.

settings.json
state.json

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Needs-Attention The core contributors need to come back around and look at this ASAP. labels Apr 25, 2025
@carlos-zamora
Copy link
Member

carlos-zamora commented Apr 25, 2025

Thanks! Got a repro! Looks like the minimal repro is this:

"windowingBehavior": "useExisting",
"compatibility.allowHeadless": true,

Looks like this got fixed in #18623, as a part of the big windowing refactor which is available in v1.23.10732.0 (the current Preview channel) . We're looking to do a release in the coming weeks, which includes moving v1.23 to the Stable channel, so a fix should be out soon 😊

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Apr 25, 2025
@carlos-zamora carlos-zamora removed the Needs-Repro We can't figure out how to make this happen. Please help find a simplified repro. label Apr 25, 2025
@carlos-zamora carlos-zamora added Resolution-Fix-Available It's available in an Insiders build or a release and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Apr 25, 2025
@carlos-zamora carlos-zamora removed their assignment Apr 25, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Tag-Fix Doesn't match tag requirements label Apr 25, 2025
@carlos-zamora
Copy link
Member

Actually, re-opening. It'll be good to have a hotfix for this on 1.22 since we have a lot of windowing changes in 1.23. Just to be safe.

@carlos-zamora carlos-zamora reopened this Apr 25, 2025
@carlos-zamora carlos-zamora self-assigned this Apr 25, 2025
@carlos-zamora carlos-zamora removed Resolution-Fix-Available It's available in an Insiders build or a release Severity-Crash Crashes are real bad news. labels Apr 25, 2025
@carlos-zamora carlos-zamora marked this as a duplicate of #18845 May 2, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot marked this as not a duplicate of #18845 May 2, 2025
@carlos-zamora carlos-zamora changed the title Terminal stops functioning after closing last window with 'Allow Windows Terminal to run in the background' enabled [1.22] Terminal stops functioning after closing last window with "compatibility.allowHeadless" enabled and "windowingBehavior" set to "useExisting"/"useAnyExisting" May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Windowing Window frame, quake mode, tearout Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants