Skip to content

Investigate using new Windows PTY support for terminal pane #3798

Closed

Description

@gtritchie

On Windows, RStudio currently uses WinPty, which relies on a hidden console and screen-scraping, to provide a pseudo-terminal like environment for the terminal pane. This has performance and behavior limitations.

Windows is adding an actual PTY-like feature; should investigate for a future version of RStudio.

https://blogs.msdn.microsoft.com/commandline/2018/08/02/windows-command-line-introducing-the-windows-pseudo-console-conpty/

We may get this via WinPty, which would be the best of both worlds (continue working on older versions of Windows, use the new greatness on builds that support it). rprichard/winpty#152

Activity

  1. added
    tech debt
    on Nov 2, 2018
  2. gtritchie commented on Sep 23, 2020

    @gtritchie
    MemberAuthor

    Should only support ConPTY on Windows-10 build 18309 or newer; VSCode found it too unstable before that build. See also the check against getWindowsBuildNumber() in the Microsoft node-pty repo.

  3. gtritchie commented on Oct 2, 2020

    @gtritchie
    MemberAuthor

    Worried that the terminal in Windows desktop is becoming unusable due to increasingly frequent reports of display issues due to WinPty (along with pre-existing problems with performance).

    VSCode faced the same thing (microsoft/vscode#45693) and ultimately solved most of them by implementing ConPTY.

    Given this is our most widely used version (Windows Desktop) I believe it is worth a short investigation to see if adding ConPTY support can be added safely for 1.4.

  4. added this to the v1.4 milestone on Oct 2, 2020
  5. self-assigned this
    on Oct 2, 2020
  6. gtritchie commented on Oct 6, 2020

    @gtritchie
    MemberAuthor

    Too ambitious for 1.4; mainly because the Windows APIs don't support async IO and require spinning up threads to prevent deadlocks. Moving to 1.5.

  7. modified the milestones: v1.4, v1.5 on Oct 6, 2020
  8. removed
    tech debt
    on Jan 28, 2021
  9. removed this from the 1.5 milestone on Feb 25, 2021
  10. 5 remaining items

  11. added this to the Later milestone on Oct 5, 2023
  12. added theissue type on Mar 3, 2025
  13. gtritchie commented on May 21, 2026

    @gtritchie
    MemberAuthor

    Need to do this before we can support ARM builds for Windows. We could, potentially, build winpty from source for ARM, and it might work, but suspect will be less painful to just go to ConPTY.

    https://learn.microsoft.com/en-us/windows/console/creating-a-pseudoconsole-session

  14. self-assigned this
    on May 21, 2026
  15. removed their assignment
    on May 27, 2026
  16. self-assigned this
    on Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions