wt doesn't seem to update the window titles property on sub processes like PowerShell/pwsh #23634

Closed
opened 2026-01-31 08:47:50 +00:00 by claunia · 2 comments
Owner

Originally created by @kilasuit on GitHub (Sep 20, 2025).

Windows Terminal version

1.23.12371.0

Windows build number

10.0.19045.0

Other Software

PowerShell 5.1
PowerShell 7.5.3
PowerShell-Preview 7.6.0-preview.4

Steps to reproduce

run powershell/pwsh in wt and then run in that session

$host.ui.RawUI.WindowTitle = 'NewTitle'

then run to check this sets in WT & passes through properly to the powershell process

get-process -Name WindowsTerminal,pwsh,powershell | Select-object name,id,MainWindowTitle

Expected Behavior

The powershell/pwsh processes that are running in WT should also return the updated window title updated & not a blank entry when queried using Get-Process

Actual Behavior

MainWindowTitle of the pwsh process running in wt returns blank (others are running in conhost)

Image
Originally created by @kilasuit on GitHub (Sep 20, 2025). ### Windows Terminal version 1.23.12371.0 ### Windows build number 10.0.19045.0 ### Other Software PowerShell 5.1 PowerShell 7.5.3 PowerShell-Preview 7.6.0-preview.4 ### Steps to reproduce run powershell/pwsh in wt and then run in that session ```powershell $host.ui.RawUI.WindowTitle = 'NewTitle' ``` then run to check this sets in WT & passes through properly to the powershell process ```powershell get-process -Name WindowsTerminal,pwsh,powershell | Select-object name,id,MainWindowTitle ``` ### Expected Behavior The powershell/pwsh processes that are running in WT should also return the updated window title updated & not a blank entry when queried using Get-Process ### Actual Behavior MainWindowTitle of the pwsh process running in wt returns blank (others are running in conhost) <img width="648" height="175" alt="Image" src="https://github.com/user-attachments/assets/7f35f56b-27ae-40da-bfd6-4a4165e4459a" />
claunia added the Resolution-By-DesignNeeds-TriageIssue-BugResolution-Won't-Fix labels 2026-01-31 08:47:50 +00:00
Author
Owner

@DHowett commented on GitHub (Oct 1, 2025):

Unfortunately, MainWindowTitle is a bit of a hack. On the .NET runtime side, it walks every visible window on the system and looks for one owned by the process it's asking about. Because Terminal runs multiple sessions inside it, we can't give one process sole "ownership" of our window handle, and so MainWindowTitle (et al) do not work properly. Unfortunately, this isn't something we're prepared to commit to fixing.

@DHowett commented on GitHub (Oct 1, 2025): Unfortunately, `MainWindowTitle` is a bit of a hack. On the .NET runtime side, it walks **every visible window on the system** and looks for one owned by the process it's asking about. Because Terminal runs multiple sessions inside it, we can't give one process sole "ownership" of our window handle, and so `MainWindowTitle` (et al) do not work properly. Unfortunately, this isn't something we're prepared to commit to fixing.
Author
Owner

@kilasuit commented on GitHub (Oct 4, 2025):

Thanks for the insight here & I guess this is also why processes via Code also show a similar issue here. I think I'll be sticking to using conhost over wt/code based sessions for continued tracability in the meantime unless I can work out a way for this to be surfaced in a different way but still as easily queried.

@kilasuit commented on GitHub (Oct 4, 2025): Thanks for the insight here & I guess this is also why processes via Code also show a similar issue here. I think I'll be sticking to using conhost over wt/code based sessions for continued tracability in the meantime unless I can work out a way for this to be surfaced in a different way but still as easily queried.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23634