[PR #1935] Force the use of v2 (non-legacy) conhost when in ConPTY mode #24721

Open
opened 2026-01-31 09:04:57 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/1935

State: closed
Merged: Yes


Fixes #1838.

Summary of the Pull Request

This pull request ensures that conhost, when started in conpty mode (that is: with a signal pipe, an inPipe or an outPipe (the latter two of which are no longer supported)), launches in modern v2 mode and doesn't delegate to ConhostV1.dll.

PR Checklist

  • Closes Bug Report (#1838)
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan.

Detailed Description of the Pull Request / Additional comments

I chose to move the check into ShouldUseLegacyConhost, but it could equally well belong in ShouldUseConhostV2. Right now, "ShouldUse...V2" is dedicated to checking the registry. It's simple to change it, but this seemed like the most scoped change.
The narrow scope of the change is intentional: perhaps we can try to service this because it represents a complete scenario breakage.

Validation Steps Performed

Manually replaced conhost on my machine and attempted to launch a pseudoconsole with pwincon while legacy mode was engaged.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/1935 **State:** closed **Merged:** Yes --- Fixes #1838. ## Summary of the Pull Request This pull request ensures that conhost, when started in conpty mode (that is: with a signal pipe, an inPipe or an outPipe (the latter two of which are no longer supported)), launches in modern v2 mode and doesn't delegate to ConhostV1.dll. ## PR Checklist * [x] Closes #1838 * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. ## Detailed Description of the Pull Request / Additional comments I chose to move the check into `ShouldUseLegacyConhost`, but it could equally well belong in `ShouldUseConhostV2`. Right now, "ShouldUse...V2" is dedicated to checking the registry. It's simple to change it, but this seemed like the most scoped change. The narrow scope of the change is intentional: perhaps we can try to service this because it represents a complete scenario breakage. ## Validation Steps Performed Manually replaced conhost on my machine and attempted to launch a pseudoconsole with pwincon while legacy mode was engaged.
claunia added the pull-request label 2026-01-31 09:04:57 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24721