New instance behavior: Attach to the most recently used window doesn't work #21485

Closed
opened 2026-01-31 07:46:02 +00:00 by claunia · 4 comments
Owner

Originally created by @stanio on GitHub (Apr 4, 2024).

Windows Terminal version

1.19.10821.0

Windows build number

10.0.19045.4170

Other Software

Using Clink v1.6.10.d5dce0 with Command Prompt (cmd) – unsure if it makes any difference.

Steps to reproduce

  1. Open a new Windows Terminal window (close any previously opened)
  2. Ensure Settings / Startup / New instance behavior: Attach to the most recently used window
  3. Run a console app/command (f.e. Win+R: cmd /c pause)

Expected Behavior

A new tab in the existing Windows Terminal window is opened to handle the console application.

Actual Behavior

A new Windows Terminal window is opened to handle the console application.

Originally created by @stanio on GitHub (Apr 4, 2024). ### Windows Terminal version 1.19.10821.0 ### Windows build number 10.0.19045.4170 ### Other Software Using [Clink](https://github.com/chrisant996/clink) v1.6.10.d5dce0 with Command Prompt (cmd) – unsure if it makes any difference. ### Steps to reproduce 1. Open a new Windows Terminal window (close any previously opened) 2. Ensure _Settings / Startup / New instance behavior: Attach to the most recently used window_ 3. Run a console app/command (f.e. <kbd>Win</kbd>+<kbd>R</kbd>: `cmd /c pause`) ### Expected Behavior A new tab in the existing Windows Terminal window is opened to handle the console application. ### Actual Behavior A new Windows Terminal window is opened to handle the console application.
Author
Owner

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

Open similar issues:

Closed similar issues:

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

@github-actions[bot] commented on GitHub (Apr 4, 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! ### Open similar issues: - [New instance behavior doesn't work as expected with multiple monitors (#14130)](https://github.com/microsoft/terminal/issues/14130), similarity score: 0.82 ### Closed similar issues: - [Windows Terminal as default terminal doesn't play well with existing windows (#16189)](https://github.com/microsoft/terminal/issues/16189), similarity score: 0.79 - [Opening new instance of CLI apps opens new window in Windows terminal instead of opening a new tab in the existing window (#11102)](https://github.com/microsoft/terminal/issues/11102), similarity score: 0.78 > Note: You can give me feedback by thumbs upping or thumbs downing this comment.
Author
Owner

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

At any point, is anything here running as admin? Or a quake mode window/?

(#15509 and #16487 both have instances where I think defterm plays weird with the remoting we need for glomming)

@zadjii-msft commented on GitHub (Apr 4, 2024): At any point, is anything here running as admin? Or a quake mode window/? (#15509 and #16487 both have instances where I think defterm plays weird with the remoting we need for glomming)
Author
Owner

@stanio commented on GitHub (Apr 4, 2024):

Not running as admin (elevated) and no quake-mode window – I've verified there's no "WindowsTerminal.exe" process in the Task Manager details, before launching the Terminal, and Win+~ doesn't open a quake-mode window, at this point.

All console applications/commands open in the same new window, if I keep it open otherwise – that's what I'm currently doing as a workaround: Start Terminal using Win+R: cmd /c pause, then I open a new tab use just that window. All console apps open in that same window, then.

@stanio commented on GitHub (Apr 4, 2024): Not running as admin (elevated) and no quake-mode window – I've verified there's no "WindowsTerminal.exe" process in the Task Manager details, before launching the Terminal, and <kbd>Win</kbd>+<kbd>~</kbd> doesn't open a quake-mode window, at this point. All console applications/commands open in the same new window, if I keep it open otherwise – that's what I'm currently doing as a workaround: Start Terminal using <kbd>Win</kbd>+<kbd>R</kbd>: `cmd /c pause`, then I open a new tab use just that window. All console apps open in that same window, then.
Author
Owner

@stanio commented on GitHub (Apr 6, 2024):

All console apps open in that same window, then.

Ah, and then other instances like "Open in Terminal" Explorer context menu start opening in a new window. 😕

@stanio commented on GitHub (Apr 6, 2024): > All console apps open in that same window, then. Ah, and then other instances like "Open in Terminal" Explorer context menu start opening in a new window. 😕
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21485