You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS Version:
Edition Windows 10 Enterprise
Version 22H2
Installed on 1/15/2021
OS build 19045.3930
Experience Windows Feature Experience Pack 1000.19053.1000.0
Steps to Reproduce:
This is precisely the same as #131594. The OP-provided code opens terminals that are separate from each other (not split). Ditto for the very similar code quoted in response (the last block). Unfortunately the OP did not follow up but I'm seeing exactly the same issue.
I've definitely seen parentTerminal work when creating two terminals at the same moment and making one the parentTerminal of the other. The option seems to be ignored if the supplied terminal was not created at the same moment, i.e. stored and used in a subsequent call.
I'm seeing very similar, I created terminals in a loop, with 2nd onwards using parentTerminal.
If I have an async "delay" between entries, the parent is ignored.
export async function delay(milliseconds: number) {
await new Promise((resolve) => setTimeout(resolve, milliseconds));
}
If I remove the delay, it all works exactly as expected.
Have just run into this myself, need to create split terminals from already existing terminals but it won't work and I don't have the option of creating them at the same time
Also ran into this. Can confirm that a delay is probably causing this. It seems like it stops working as soon as the terminal that should be used as a parent ran through the TerminalService's acceptTerminalOpened. After this it gets assigned some kind of internal instance id and the lookup for the parent fails from here on.
Activity
apeters-brex commentedon Mar 29, 2024
For me, the example from #131594 works, but fails when I try to split from an existing terminal (one not created within that same function).
For instance, if you take that same snippet and change
options_1to includeThen run the command when you have an existing terminal,
terminal_1does not get split from that existing terminal.DeeHants commentedon Apr 30, 2025
I'm seeing very similar, I created terminals in a loop, with 2nd onwards using
parentTerminal.If I have an async "delay" between entries, the parent is ignored.
If I remove the delay, it all works exactly as expected.
I do not have a solution yet.
TristanSpeakEasy commentedon Feb 24, 2026
Have just run into this myself, need to create split terminals from already existing terminals but it won't work and I don't have the option of creating them at the same time
erikmueller commentedon Apr 24, 2026
Also ran into this. Can confirm that a delay is probably causing this. It seems like it stops working as soon as the terminal that should be used as a parent ran through the
TerminalService'sacceptTerminalOpened. After this it gets assigned some kind of internal instance id and the lookup for the parent fails from here on.