microsoft / microsoft/terminal
Terminal cannot be closed when the defterm client closes too quickly (and creates a window with no tabs)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
> [!IMPORTANT]
> 📌 Pinned comment: **https://github.com/microsoft/terminal/issues/15936#issuecomment-1710747811**
> We're pretty sure this comes down to two effects:
> * The client app closes before the Terminal can accept the handoff and create a tab for it.
> * The Terminal can't be closed when it has no tabs open.
>
> We should really fix both of these at the same time.
### Windows Terminal version
1.17.12191.0
### Windows build number
25941.1000
### Other Software
_No response_
### Steps to reproduce
There's no routine to easily reproduce it. It happens occasionally when I use some command line tools (like npm) that will invoke another terminal/cmd console. When the process is done, the invoked terminal will not close successfully (only the tab is closed, which results in an empty terminal with no tab), and you are unable to close it manually (because there's no tab).
### Expected Behavior
A terminal losing any tabs should not exist.
### Actual Behavior

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the defterm client handoff and the terminal-close path when no tabs remain. Use the npm or similar command-line scenario described in the issue to exercise the intermittent case. Done means a client that exits quickly and a terminal that loses its last tab no longer leave an uncloseable empty window.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100