Skip to content

Double prompt when closing powershell extension terminal #4145

Closed

Description

@Tyriar

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

I closed the terminal and got 2 notifications

PowerShell Version

N/A

Visual Studio Code Version

Version: 1.71.0-insider (user setup)
Commit: 28f604dec81b609dd7e69362585f7a99d4c48f88
Date: 2022-08-19T05:17:14.894Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.22000
Sandboxed: Yes

Extension Version

ms-vscode.powershell-preview@2022.8.3

Steps to Reproduce

Open a ps1 file, close the terminal

Visuals

image

Logs

No response

Activity

  1. ghost added
    Needs: TriageMaintainer attention needed!
    on Aug 19, 2022
  2. andyleejordan commented on Aug 19, 2022

    @andyleejordan
    Member

    Known issue, I've already filed a request upstream for us to improve this together: microsoft/vscode-languageserver-node#1057

  3. andyleejordan commented on Aug 26, 2022

    @andyleejordan
    Member

    FWIW I'm also considering turning showOnStartup false by default, so that the terminal pane isn't opened when the extension activates, and then setting this to CloseAction.Restart automatically, which especially with the startInBackground option for those that never want to see the terminal could make the extension far less noisy, but also always on and working. Patrick Meinecke (@SeeminglyScience) thoughts?

  4. Wallby commented on Apr 7, 2026

    @Wallby

    for those that never want to see the terminal could make the extension far less noisy, but also always on and working

    This is why I commented on #2418
    I'd rather have a background instance remaining if I close it. Or alternatively, if I close the extension terminal in the GUI, that it doesn't actually delete it but just hides it the same way start in background does initially. Such that I can start it in background AND move it back to the background by closing it without having to close VS Code.

  5. andyleejordan commented on Jun 16, 2026

    @andyleejordan
    Member

    Fixed by #5380 (follow-up #5463). The double prompt came from the LSP client library showing its own "connection closed" notification on top of the extension's restart prompt. #5380 marks the client library's close action as handled, suppressing that duplicate, so only a single prompt is shown now. Closing as fixed — please reopen if you still see two prompts on a recent preview build.

    🤖 Drafted by Copilot for Andy Jordan (@andyleejordan) to review/edit.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions