microsoft / microsoft/terminal

CMD's `start` command and `Start-Process pwsh` opens all new tabs in new second instance of WT, despite settings

Open
#18,090 6 comments 0 reactions 0 assignees View on GitHub
Area-Windowing Issue-Bug Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.20.11781.0

### Windows build number

10.0.19044.5011

### Other Software

_No response_

### Steps to reproduce

Edit: This can also be done from Powershell using `start-process pwsh` (and likely `start powershell`)

1. Open Windows Terminal with no other instances already running.
2. In that same window, open Command Prompt profile (unless it is your default launch profile)
3. Execute `start` command.
4. Execute `start` command from the same window as step 3.
5. Execute `start` command on the new spawned window from steps 3 or 4.

### Startup settings:

![Image](https://github.com/user-attachments/assets/c985748c-c155-4dae-b762-87d7f3b5e40e)

### Expected Behavior

- With step 3, `start` should open a new tab in the same window we just opened.
- With step 4, `start` should open a new tab in the same window we just opened, again.
- With step 5, if executing `start` from a new window, it should open a new tab in that same window.
- If step 3 and 4 go as expected, step 5 shouldn't even exist.

### Actual Behavior

- With step 3, `start` opens a new tab in a new window. (unexpected)
- With step 4, `start` opens a new tab in the same new window opened in step 2. (unexpected)
- With step 5, `start` in the same new window as step 3 opens a new tab in the same new window opened in step 3 (this one works as expected).

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior with CMD's `start` command and PowerShell's `Start-Process pwsh` using the listed Windows Terminal and Windows build versions. Trace how these commands choose a terminal window and tab, then verify that each invocation opens a tab in the window where it was run rather than a second instance.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.