Terminal windows opened from Windows Explorer via double click cannot join with existing terminal sessions #20031

Open
opened 2026-01-31 07:01:20 +00:00 by claunia · 15 comments
Owner

Originally created by @Mersid on GitHub (Jun 5, 2023).


Note

: 📌 Pinned comment: https://github.com/microsoft/terminal/issues/15509#issuecomment-1592021826


Windows Terminal version

1.18.1462.0

Windows build number

10.0.19045.3031

Other Software

Any program that spawns a terminal window

Steps to reproduce

When the default terminal application is set to the Windows Terminal (preview, in this case), programs, such as servers, that open a terminal window will have windows whose tabs cannot join with regular terminal windows.

Expected Behavior

Any instance of Windows Terminal may join into any other window.

Actual Behavior

The spawned terminal window will not be able to join with an existing terminal group. The "Move" popup does not appear, and the tab will not join into the existing window.

Originally created by @Mersid on GitHub (Jun 5, 2023). <hr> > **Note**: 📌 Pinned comment: **https://github.com/microsoft/terminal/issues/15509#issuecomment-1592021826** <hr> ### Windows Terminal version 1.18.1462.0 ### Windows build number 10.0.19045.3031 ### Other Software Any program that spawns a terminal window ### Steps to reproduce When the default terminal application is set to the Windows Terminal (preview, in this case), programs, such as servers, that open a terminal window will have windows whose tabs cannot join with regular terminal windows. ### Expected Behavior Any instance of Windows Terminal may join into any other window. ### Actual Behavior The spawned terminal window will not be able to join with an existing terminal group. The "Move" popup does not appear, and the tab will not join into the existing window.
Author
Owner

@237dmitry commented on GitHub (Jun 5, 2023):

Double clicking opens the application in the default console.
If default:

Windows Terminal Conhost Let Windows decide
Windows Terminal (new tab) conhost conhost

"windowingBehavior": "useExisting"

WT: 1.18.1462.0
Win 11 22H2

@237dmitry commented on GitHub (Jun 5, 2023): Double clicking opens the application in the default console. If default: | Windows Terminal | Conhost | Let Windows decide | |:---------------------|----------|-----------| | Windows Terminal (new tab) | conhost | conhost | `"windowingBehavior": "useExisting"` WT: 1.18.1462.0 Win 11 22H2
Author
Owner

@Mersid commented on GitHub (Jun 5, 2023):

My apologies, I do not understand?

@Mersid commented on GitHub (Jun 5, 2023): My apologies, I do not understand?
Author
Owner

@zadjii-msft commented on GitHub (Jun 5, 2023):

Are you running the Terminal as Admin/?

Terminal (stable) windows can't be merged with Terminal Preview windows. There is one report we've had in the past about Preview<->Preview communication not working, though that was a very rare edge case

@zadjii-msft commented on GitHub (Jun 5, 2023): Are you running the Terminal as Admin/? Terminal (stable) windows can't be merged with Terminal Preview windows. There is one report we've had in the past about Preview\<->Preview communication not working, though that was a _very_ rare edge case
Author
Owner

@Mersid commented on GitHub (Jun 5, 2023):

No, I am not running Terminal as admin.

@Mersid commented on GitHub (Jun 5, 2023): No, I am not running Terminal as admin.
Author
Owner

@237dmitry commented on GitHub (Jun 6, 2023):

I do not understand?

Read this

  • set Windows Terminal as default console
  • set "windowingBehavior": "useExisting" in settings.json
@237dmitry commented on GitHub (Jun 6, 2023): > I do not understand? [Read this](https://learn.microsoft.com/en-us/windows/terminal/customize-settings/startup) - set Windows Terminal as default console - set `"windowingBehavior": "useExisting"` in settings.json
Author
Owner

@Mersid commented on GitHub (Jun 7, 2023):

Thanks for the suggestion. I tried that, and unfortunately it does not appear to work. The issue still persists :(

@Mersid commented on GitHub (Jun 7, 2023): Thanks for the suggestion. I tried that, and unfortunately it does not appear to work. The issue still persists :(
Author
Owner

@carlos-zamora commented on GitHub (Jun 14, 2023):

Hi @Mersid.

  • Does this repro if you switch default terminal over to the non-preview version? (make sure windowingBehavior is properly set and you're not running terminal as admin, as mentioned earlier in the thread) We're thinking this may be related to the process model changes we made to the preview version.
@carlos-zamora commented on GitHub (Jun 14, 2023): Hi @Mersid. - Does this repro if you switch default terminal over to the non-preview version? (make sure `windowingBehavior` is properly set and you're not running terminal as admin, as mentioned earlier in the thread) We're thinking this may be related to the process model changes we made to the preview version.
Author
Owner

@DHowett commented on GitHub (Jun 14, 2023):

Oh no. Ohhh, noooo.

This is definitely broken in 1.18. Instances of Terminal started for -Embedding don't seem to glom with other instances of Terminal.

@DHowett commented on GitHub (Jun 14, 2023): Oh no. Ohhh, noooo. This is definitely broken in 1.18. Instances of Terminal started for `-Embedding` don't seem to glom with other instances of Terminal.
Author
Owner

@Mersid commented on GitHub (Jun 14, 2023):

Hello, @carlos-zamora

The current non-preview version of Windows Terminal (for me) is 1.17.11461.0, and does not support the drag'n'drop feature yet.

@Mersid commented on GitHub (Jun 14, 2023): Hello, @carlos-zamora The current non-preview version of Windows Terminal (for me) is 1.17.11461.0, and does not support the drag'n'drop feature yet.
Author
Owner

@zadjii-msft commented on GitHub (Aug 31, 2023):

Wait @DHowett can you actually repro this?

I've been futzing with this all morning and can't get a repro locally with a dev build1 . I can't do it with a Terminal-first cold launch, or a cmd.exe(defterm)-first cold launch. And I can't repro it via #15518 either.

I'm moving this to @DHowett to try and fix. Or close as fixed along the way of 1.192 .


  1. Admittedly, I did spend a few hours on #15238 and the associated "blow away a dev build to fix a bad defterm registration". But once I got dev build defterm working again, then I haven't had any troubles with this. ↩︎

  2. There's maybe a small chance that #15424 fixed this? but that seems unlikely. ↩︎

@zadjii-msft commented on GitHub (Aug 31, 2023): Wait @DHowett can you actually repro this? I've been futzing with this all morning and can't get a repro locally with a dev build[^1]. I can't do it with a Terminal-first cold launch, or a `cmd.exe`(defterm)-first cold launch. And I can't repro it via #15518 either. I'm moving this to @DHowett to try and fix. Or close as fixed along the way of 1.19[^2]. [^1]: Admittedly, I did spend a few hours on #15238 and the associated "blow away a dev build to fix a bad defterm registration". But once I got dev build defterm working again, then I haven't had any troubles with this. [^2]: There's maybe a small chance that #15424 fixed this? but that seems unlikely.
Author
Owner

@krzysdz commented on GitHub (Aug 31, 2023):

@zadjii-msft If this is the same problem as #15636 then it definitely isn't fixed and I can reproduce it with the latest build (d54ce33afc / 636be7e514).

@krzysdz commented on GitHub (Aug 31, 2023): @zadjii-msft If this is the same problem as #15636 then it definitely isn't fixed and I can reproduce it with the latest build (d54ce33afcd5e9875b53e4449ea3d2fd5c1ebc07 / 636be7e514e243810e8944a61f5cf7044d316e05).
Author
Owner

@DHowett commented on GitHub (Sep 1, 2023):

I can't reproduce it in 1.19, but I do not know whether that is because it doesn't reproduce on this machine or because it is fixed in 1.19.

@DHowett commented on GitHub (Sep 1, 2023): I can't reproduce it in 1.19, but I do not know whether that is because it doesn't reproduce on this machine or because it is fixed in 1.19.
Author
Owner

@bracco23 commented on GitHub (Nov 5, 2023):

tried reproducing #16189 to get some traces to share here but when i tried on my home pc (same setup, just win 11 instead of win 10), it didn't repro. So this is possibly some quirk of win 10 that got fixed on win 11. Sorry, i'm probably not allowed to share traces from my work PC so can't give any more info.

@bracco23 commented on GitHub (Nov 5, 2023): tried reproducing #16189 to get some traces to share here but when i tried on my home pc (same setup, just win 11 instead of win 10), it didn't repro. So this is possibly some quirk of win 10 that got fixed on win 11. Sorry, i'm probably not allowed to share traces from my work PC so can't give any more info.
Author
Owner

@krzysdz commented on GitHub (Nov 6, 2023):

this is possibly some quirk of win 10 that got fixed on win 11.

I've just tried repeating #15636 in a VM and it can be only reproduced on Windows 10 - after installing Windows 11 the issue disappeared.

@krzysdz commented on GitHub (Nov 6, 2023): > this is possibly some quirk of win 10 that got fixed on win 11. I've just tried repeating #15636 in a VM and it can be only reproduced on Windows 10 - after installing Windows 11 the issue disappeared.
Author
Owner

@CrendKing commented on GitHub (May 9, 2024):

I'm running Windows 11 (build 22631.3447), use Windows Terminal as default terminal, and I notice if I run a cmd file, it always opens in a new terminal window than say I run "wt.exe". However, if I create a shortcut with wt.exe test.cmd, that terminal window can be reused.

Like DHowett mentioned above, I think the default terminal handler has special logic to put those associated file opening in a separate terminal process, which has "-Embedding" in the launch command line and parented by svchost.exe.

Right now, I basically have to put "wt.exe" in front of every cmd file launch to reuse window, which defeats the whole purpose of setting Windows Terminal as default terminal.

@CrendKing commented on GitHub (May 9, 2024): I'm running Windows 11 (build 22631.3447), use Windows Terminal as default terminal, and I notice if I run a cmd file, it always opens in a new terminal window than say I run "wt.exe". However, if I create a shortcut with `wt.exe test.cmd`, that terminal window can be reused. Like DHowett mentioned above, I think the default terminal handler has special logic to put those associated file opening in a separate terminal process, which has "-Embedding" in the launch command line and parented by svchost.exe. Right now, I basically have to put "wt.exe" in front of every cmd file launch to reuse window, which defeats the whole purpose of setting Windows Terminal as default terminal.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20031