Skip to content

sudo always opens a new window by Console Host (ConHost) #129

Open

Description

Sudo for Windows version

sudo 1.0.1

Windows build number

10.0.26100.0

Other Software

No response

Steps to reproduce

Image
  1. Windows Settings → System → For developers
    1. Set "Terminal" to "Windows Terminal"
    2. Toggle "Enable sudo" on
    3. Set "Configure how sudo runs applications" to "In a new window"
  2. 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.

Activity

  1. added
    Issue-Bug
    Needs-Triage
    on Sep 27, 2025
  2. changed the title [-]sudo always opens a new window as Console Host[/-] [+]sudo always opens a new window as Console Host (ConHost)[/+] on Sep 27, 2025
  3. 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
  4. YexuanXiao commented on May 29, 2026

    @YexuanXiao

    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).

  5. rruusu commented on Sep 16, 2026

    @rruusu

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugNeeds-Triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions