Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Bug description
When pasting text longer than ~1018 bytes into Cursor’s integrated terminal, chunks of text are silently dropped. The truncation is deterministic — the same text always loses the same characters at the same position. The same text pastes correctly in VS Code’s terminal.
Steps to Reproduce
Steps to reproduce
- Copy a text longer than 1018 bytes from any source (browser, text editor)
- Open Cursor’s integrated terminal
- Paste the text into Cursor’s terminal (bare terminal or any CLI tool like Claude Code)
- Observe that chunks of text are missing around the ~1018 byte boundary
The bug affects the terminal itself, not a specific CLI tool.
Test 1 — French text (1110 bytes, UTF-8 multi-byte):
- Clipboard (verified with pbpaste): “Il n’est pas question pour nous de promouvoir un outil”
- Pasted in Cursor terminal: “Il ous de promouvoir un outil”
- Truncation at byte ~1018 — the phrase “n’est pas question pour n” is silently dropped
Test 2 — English text (1630 bytes, pure ASCII):
- Clipboard: “Mr. Trump suddenly raised the tariffs to […] it allowed”
- Pasted in Cursor terminal: “Mr. Trump suddenly raised the tariffs toit allowed”
- Truncation at byte ~994 — text chunks are dropped around the 1018-byte boundary
Test 3 — French article (2340 bytes, UTF-8):
- Clipboard: “de le faire cuire dans une grande quantité d’eau pour […] Les huiles (olive, colza) doivent être vierges”
- Pasted in Cursor terminal: “d’eau poe, colza) doivent être vierges”
- Same pattern — chunks lost around the buffer boundary
The bug is NOT language-specific. French (UTF-8), English (ASCII), and long articles are all affected.
Expected Behavior
The full pasted text should arrive intact in the terminal, without any data loss, regardless of length. This is the current behavior in VS Code 1.109.5.
Operating System
MacOS
Version Information
Cursor 2.5.20:
- Base VS Code: 1.105.1
- node-pty: 1.1.0-beta42 (missing the fix)
- xterm.js: 5.6.0-beta.99
- Paste bug: Yes (~1018 bytes)
VS Code 1.109.5:
- node-pty: 1.2.0-beta.10 (includes the fix from PR #831)
- xterm.js: 6.1.0-beta.109
- Paste bug: No
Verified by inspecting package.json files in:
- Cursor: /Applications/Cursor.app/Contents/Resources/app/node_modules/
- VS Code: /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules/
- Cursor base version: product.json → vscodeVersion: 1.105.1
Additional Information
Root cause
This is a known 8-year-old bug in the VS Code terminal stack, finally root-caused and fixed in December 2025.
Timeline:
- Nov 2017: VS Code #38137 — “Can’t paste long text into terminal” reported
- Aug 2020: VS Code adds a throttling workaround (sends text in small chunks with delays) — reduces the problem but doesn’t fix it
- Dec 12, 2025: VS Code #283056 — “Remove ugly throttling mechanism when pasting to the terminal”. The VS Code terminal maintainer (Tyriar) identifies the real culprit: node-pty, not xterm.js
- Dec 13, 2025: The real fix is merged in node-pty PR #831. The bug was that node-pty used Node.js tty.WriteStream API which silently drops data on non-blocking PTY writes
- Dec 15, 2025: VS Code #283056 closed, throttling workaround removed
The fix is in node-pty v1.2.0. Cursor still ships node-pty v1.1.0.
Why the bug appeared recently in Cursor:
Before December 2025, VS Code (and Cursor, which inherits its code) had a throttling workaround that sent pasted text in small chunks with delays between each write. This workaround masked the underlying node-pty bug — text was slow to paste but arrived complete.
In December 2025, VS Code removed this workaround (VS Code #283056) because the real fix in node-pty v1.2.0 made it unnecessary. Cursor likely picked up the workaround removal when merging recent VS Code changes into their fork, but did NOT update node-pty to v1.2.0. This created the worst-case scenario: no workaround AND no real fix — causing the paste truncation bug to resurface for Cursor users.
Verified by inspecting package.json files in:
- Cursor: /Applications/Cursor.app/Contents/Resources/app/node_modules/
- VS Code: /Applications/Visual Studio Code.app/Contents/Resources/app/node_modules/
- Cursor base version: product.json → vscodeVersion: 1.105.1
References:
- VS Code #283056: Remove ugly throttling mechanism when pasting to the terminal · Issue #283056 · microsoft/vscode · GitHub
- node-pty fix PR #831: Handle writes to non-blocking pty instead of wrapping via Node's tty api by Tyriar · Pull Request #831 · microsoft/node-pty · GitHub
Environment
- Cursor version: 2.5.20 (based on VS Code 1.105.1)
- OS: macOS 15.5 (Darwin 25.3.0)
- node-pty in Cursor: 1.1.0-beta42
- node-pty in VS Code: 1.2.0-beta.10
- xterm.js in Cursor: 5.6.0-beta.99
- xterm.js in VS Code: 6.1.0-beta.109
Suggested fix
Update node-pty from v1.1 to v1.2 to include the fix from microsoft/node-pty#831. This is the critical fix that resolves the paste truncation. Updating xterm.js from v5.6 to v6.x would also be beneficial to stay aligned with upstream VS Code.
Does this stop you from using Cursor
Yes - Cursor is unusable