Frequent "node:events:502 throw err; // Unhandled 'error' event" in terminals

Describe the Bug

I get this error in terminals, both in Terminal panel, and in terminal sessions in chat:

node:events:502
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:161:15)
    at writeGeneric (node:internal/stream_base_commons:152:3)
    at Socket._writeGeneric (node:net:958:11)
    at Socket._write (node:net:970:8)
    at writeOrBuffer (node:internal/streams/writable:572:12)
    at _write (node:internal/streams/writable:501:10)
    at Writable.write (node:internal/streams/writable:510:10)
    at console.value (node:internal/console/constructor:303:16)
    at console.log (node:internal/console/constructor:378:26)
    at yn (file:///Applications/Cursor.app/Contents/Resources/app/out/cli.js:31:14947)
    at out-build/vs/code/node/cli.js (file:///Applications/Cursor.app/Contents/Resources/app/out/cli.js:31:19695)
    at file:///Applications/Cursor.app/Contents/Resources/app/out/cli.js:5:10605
    at file:///Applications/Cursor.app/Contents/Resources/app/out/cli.js:44:4086
    at async file:///Applications/Cursor.app/Contents/Resources/app/out/cli.js:44:4052
Emitted 'error' event on Socket instance at:
    at Socket.onerror (node:internal/streams/readable:1028:14)
    at Socket.emit (node:events:524:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}

Node.js v20.19.0

It doesn’t seem

Steps to Reproduce

The easiest way I have to recreate it is to create a terminal (control-backtick is a quick way to pull it up), and then hold down enter

Expected Behavior

I wouldn’t expect to see this during normal terminal usage.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.2.4
VSCode Version: 1.99.3
Commit: a8e95743c5268be73767c46944a71f4465d05c90
Date: 2025-07-10T16:53:59.659Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Additional Information

I use fish for my shell

Does this stop you from using Cursor

No - Cursor works, but with this issue

It occurred to me this may more generalized to being a vscode behavior, and with that I found: Error: write EPIPE · Issue #231807 · microsoft/vscode · GitHub . This is both my shell, and my prompt (tide ).

I tried lots of different variations on tide configuration, and wasn’t able to fix it. I found a previous report on the tide repo: Error: write EPIPE in vscode terminal · Issue #538 · IlanCosman/tide · GitHub

Unfortunately, it was closed with a comment about removing some lines from instructions I can’t even find. So I opened a new issue: Error: write EPIPE in vscode terminal · Issue #538 · IlanCosman/tide · GitHub

Hi @technicalpickles does this still occur also on 1.4.2?

Yes, it does. I checked 1.4.3 which came out since then, and same result

Version: 1.4.3
VSCode Version: 1.99.3
Commit: e50823e9ded15fddfd743c7122b4724130c25df0
Date: 2025-08-08T17:34:53.060Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

Thank you for the update. I’ve sent it to the team for checking.

Kindly note that some terminals are not as common and therefore not as widely supported yet.

Could you temporarily change your default terminal in Cursor Settings?

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.