Skip to content

Conversation

@anthonykim1
Copy link
Contributor

Resolves: #293524

@anthonykim1 anthonykim1 added this to the February 2026 milestone Feb 10, 2026
@anthonykim1 anthonykim1 requested a review from Tyriar February 10, 2026 18:30
@anthonykim1 anthonykim1 self-assigned this Feb 10, 2026
Copilot AI review requested due to automatic review settings February 10, 2026 18:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves the Windows terminal launch failure messaging by making the “Cannot launch conpty” native exception more actionable, pointing users to winpty removal context and a potential configuration workaround.

Changes:

  • Adds a specialized localized error message for conpty launch failures in TerminalProcess.
  • Adds a unit test covering formatting of the new conpty launch failure message in parseExitResult.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/vs/platform/terminal/node/terminalProcess.ts Detects “Cannot launch conpty” errors and returns a more informative localized launch error message.
src/vs/workbench/contrib/terminal/test/browser/terminalInstance.test.ts Adds a regression test ensuring the conpty launch failure message is formatted as expected.

return { message: `A native exception occurred during launch (${err.message})` };
const errorMessage = err.message;
if (errorMessage?.includes('Cannot launch conpty')) {
return { message: localize('conptyLaunchFailed', "A native exception occurred during launch (Cannot launch conpty). Winpty has been removed, see {0} for more details. You can also try enabling the `{1}` setting.", 'https://code.visualstudio.com/updates/v1_109#_removal-of-winpty-support', 'terminal.integrated.windowsUseConptyDll') };
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This localized conpty error message ends with a period and includes markdown-style backticks around the setting name. Because parseExitResult appends a trailing "." when formatting launch failures, this will produce a double period in the final message. Also, backticks are typically used in markdown contexts; for plain error messages it would be more consistent to use quotes (or no decoration) around the setting name.

Suggested change
return { message: localize('conptyLaunchFailed', "A native exception occurred during launch (Cannot launch conpty). Winpty has been removed, see {0} for more details. You can also try enabling the `{1}` setting.", 'https://code.visualstudio.com/updates/v1_109#_removal-of-winpty-support', 'terminal.integrated.windowsUseConptyDll') };
return { message: localize('conptyLaunchFailed', "A native exception occurred during launch (Cannot launch conpty). Winpty has been removed, see {0} for more details. You can also try enabling the \"{1}\" setting", 'https://code.visualstudio.com/updates/v1_109#_removal-of-winpty-support', 'terminal.integrated.windowsUseConptyDll') };

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update error description to point to winpty removal, and/or conpty dll setting

1 participant