tide icon indicating copy to clipboard operation
tide copied to clipboard

Error: write EPIPE in vscode and cursor terminals

Open technicalpickles opened this issue 5 months ago • 0 comments

Describe the bug

I'm basically re-reporting https://github.com/IlanCosman/tide/issues/538 . Basically, I see this in Cursor and VScode randomly in the terminal, like hitting return a bunch of times:

❯ 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 un (file:///Applications/Cursor.app/Contents/Resources/app/out/cli.js:31:14652)
    at out-build/vs/code/node/cli.js (file:///Applications/Cursor.app/Contents/Resources/app/out/cli.js:31:19404)
    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:4088
    at async file:///Applications/Cursor.app/Contents/Resources/app/out/cli.js:44:4054
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'
}

Steps to reproduce

  1. install tide
  2. tide configure, use basically any configuration you can think of
  3. open vscode/cursor, and open a terminal
  4. hit enter a bunch of times

Screenshots

Here it is in action:

https://github.com/user-attachments/assets/0318b850-0e1e-4b76-b2e5-13bc20c12315

Environment

Output of tide bug-report:

What operating system are you using? (e.g Ubuntu 20.04): macOS 15.6
What terminal emulator are you using? (e.g Kitty): Cursor

Please copy the following information into the issue:

fish version: 4.0.2
tide version: 6.2.0
term: xterm-256color
os: macOS 15.6
terminal emulator: Cursor
fish startup: 425.35 millis
fisher plugins: jorgebucaran/fisher jethrokuan/z jorgebucaran/autopair.fish oh-my-fish/plugin-bang-bang edc/bass ilancosman/tide@v6

Additional context

I tried a ton of different configurations, but wasn't able to isolate it to any one part of the prompt. For example, I started with my normal multi-line, transient powered, icon-full and tried to strip it down as much as possible (basically 1 for every option), but I was able to reproduce in every case.

I tried with and without terminal auto-injection):

Image

The original bug, https://github.com/IlanCosman/tide/issues/538, mentioned:

found the error is from

string match -q "$TERM_PROGRAM" "vscode"
and . (code --locate-shell-integration-path fish)

from the vscode instructions. if remove these two lines error disappears.

But, but it's not really clear what vscode instructions it's referring to.

technicalpickles avatar Aug 06 '25 15:08 technicalpickles