Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
I’m using the Extension API vscode.Pseudoterminal for displaying output from my extensions. It has worked fine for years, but recently started to misbehave such that: Output first is arriving just fine in the terminal, but after some different amount of time (most often within an hour) output stops arriving .
Also , my extensions keep track of when the terminal is closed using Pseudoterminal.close(). When a terminal has stopped displaying output, this handler also stops receiving calls. (onDidCloseTerminal seems to keep working.)
In VS Code, Version: 1.128.0-insider, I can’t reproduce the issue.
Steps to Reproduce
- Have an extension open a pseudo terminal
- Start a heartbeat output to the terminal, say every minute
An easy way to do this is to install the Joyride extension, issue the command Joyride: Run Clojure Code…, and paste this:
(require '["vscode" :as vscode])
(let [!seq (atom 0)
!interval (atom nil)
emitter (vscode/EventEmitter.)
fire! (fn []
(let [n @!seq]
(swap! !seq inc)
(.fire emitter (str "beat " n " " (.toISOString (js/Date.)) "\r\n"))))
pty #js {:onDidWrite (.-event emitter)
:open (fn [_]
(fire!)
(when-not @!interval
(reset! !interval (js/setInterval fire! 60000))))
:close (fn []
(when-let [id @!interval]
(js/clearInterval id)
(reset! !interval nil))
(vscode/window.showInformationMessage
"PTY heartbeat: Pseudoterminal.close()"))
:handleInput (fn [_] nil)}
term (vscode/window.createTerminal #js {:name "PTY heartbeat" :pty pty})]
(.show term true)
(.onDidCloseTerminal vscode/window
(fn [t]
(when (identical? t term)
(vscode/window.showInformationMessage
"PTY heartbeat: onDidCloseTerminal"))))
:started)
(You can also ask the agent to run the code for you.)
Expected Behavior
We expect the pseudo terminal to keep displaying the heartbeats, indefinitely. And when the terminal is closed/killed, we expect two info message boxes, saying it was closed.
Instead, it stops displaying heartbeats after a while. And after it has stopped like this, closing/kiling it will only show the message box fromonDidCloseTerminal.
Operating System
MacOS
Version Information
Version: 3.17.8
VS Code Extension API: 1.128.0
Commit: 2fdd31c9f33f7fbe501f2d57772dc5bf64b63620
Date: 2026-08-20T02:18:12.724Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.291
OS: Darwin arm64 25.5.0
Does this stop you from using Cursor
No - Cursor works, but with this issue