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
{{ message }}
Repository navigation
sudo always opens a new window by Console Host (ConHost) #129
Set "Configure how sudo runs applications" to "In a new window"
Run a command with sudo
Expected Behavior
Open a new Windows Terminal window.
sudo used to adopt this behavior.
Actual Behavior
It always uses Console Host. It does not respect the value "Terminal" in the Settings.
Console Host halts running applications just by clicking its screen. This behavior is not compatible with management commands/software. Do not use it.
changed the title [-]sudo always opens a new window as Console Host (ConHost)[/-][+]sudo always opens a new window by Console Host (ConHost)[/+]on Sep 27, 2025
Currently, Windows Terminal is a third-party software for Windows, especially since it is installed on a per-user basis, which prevents an elevated conhost process from launching Windows Terminal due to security restrictions. Improving this would require reinventing a default terminal protocol that does not rely on COM activation, and currently, I don't think the terminal team has such a plan. However, it is not impossible. I have already implemented a new conhost that is architecturally complete. By replacing Windows' conhost, it could solve the existing problems in any way (I haven't implemented this yet, so it currently has the same limitations).
There is also the issue that the Console Host window closes as soon as the command is executed, which makes it unusable for tasks that would necessitate viewing of the output of the command or seeing error messages from the command. The console window should be left open so that the user can see what the output of the command was.
Activity
[-]sudo always opens a new window as Console Host[/-][+]sudo always opens a new window as Console Host (ConHost)[/+][-]sudo always opens a new window as Console Host (ConHost)[/-][+]sudo always opens a new window by Console Host (ConHost)[/+]YexuanXiao commentedon May 29, 2026
Currently, Windows Terminal is a third-party software for Windows, especially since it is installed on a per-user basis, which prevents an elevated conhost process from launching Windows Terminal due to security restrictions. Improving this would require reinventing a default terminal protocol that does not rely on COM activation, and currently, I don't think the terminal team has such a plan. However, it is not impossible. I have already implemented a new conhost that is architecturally complete. By replacing Windows' conhost, it could solve the existing problems in any way (I haven't implemented this yet, so it currently has the same limitations).
rruusu commentedon Sep 16, 2026
There is also the issue that the Console Host window closes as soon as the command is executed, which makes it unusable for tasks that would necessitate viewing of the output of the command or seeing error messages from the command. The console window should be left open so that the user can see what the output of the command was.