Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Pasting text larger than ~1KB into Cursor’s integrated terminal while Claude Code (CLI) is running causes a complete terminal freeze. No input is accepted and the session must be killed.
Key finding: Stack sampling (macOS sample command) during the freeze shows the Claude Code Node.js process is 99.5% idle (kevent64 wait). The freeze is NOT in Claude Code – it is in Cursor’s PTY/renderer layer.
This does NOT reproduce in VS Code, iTerm2, Antigravity, or Terminal.app with the same text and same Claude Code version.
Steps to Reproduce
- Open Cursor 2.6.19
- Open the integrated terminal (zsh)
- Run
claude(Claude Code CLI v2.1.76) - Copy >1KB of text to clipboard
- Paste with Cmd+V
- Terminal freezes – no input accepted, must kill the terminal session
Note: Short pastes (a few lines) work fine. The issue triggers with longer text.
Expected Behavior
Text should appear as folded paste notation like [Pasted text #1 +N lines] (Claude Code’s bracketed paste handling), or at minimum the terminal should remain responsive.
Operating System
MacOS
Version Information
IDE: Cursor 2.6.19
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 25.2.1
OS: macOS 26.3.1 (25D2128), Apple Silicon (M4 Pro)
Bundled node-pty: 1.1.0-beta42
Bundled @xterm/xterm: 5.6.0-beta.99
For AI issues: which model did you use?
N/A – this is not an AI model issue. It is a terminal/PTY issue triggered by paste input.
For AI issues: add Request ID with privacy disabled
N/A
Additional Information
Diagnostic evidence
Stack sampling (sample <pid> 3) of the Claude Code process during freeze:
2407/2419 samples (99.5%) -> kevent64 (idle event loop)
7/2419 samples -> StreamBase::Write path
5/2419 samples -> timer/callback processing
The Claude Code process is NOT blocked. It is waiting for events normally. The blockage is between Cursor’s PTY host and the terminal renderer.
Settings changes tried (none resolved the freeze)
| Setting | Result |
|---|---|
ignoreBracketedPasteMode: false |
No effect |
enablePersistentSessions: false |
No effect |
persistentSessionScrollback: 0 |
No effect |
scrollback: 500 |
No effect |
gpuAcceleration: "off" |
No effect |
smoothScrolling: false |
No effect |
tabs.enableAnimation: false |
No effect |
Claude Code statusLine disabled |
No effect |
Claude Code terminalProgressBarEnabled: false |
No effect |
Claude Code prefersReducedMotion: true |
No effect |
ENABLE_IDE_INTEGRATION=false |
No effect |
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 |
No effect |
CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1 |
No effect |
| SessionEnd hook to reset bracketed paste mode | No effect on freeze |
ptyhost.log observation
Before applying enablePersistentSessions: false:
Persistent process "1": Replaying 1018 chars and 1 size events
This replay was eliminated by disabling persistent sessions, but the freeze persisted – indicating the root cause is deeper in the PTY/renderer pipeline.
Analysis
The root cause appears to be Cursor’s bundled node-pty (1.1.0-beta42) failing to handle backpressure when large paste input is sent to a raw-mode PTY (as used by Claude Code’s Ink TUI). VS Code does not exhibit this issue, likely due to a newer PTY implementation.
Related GitHub Issues (anthropics/claude-code)
- #3134 – Bracketed paste mode corruption
- #32443 – CLI freezes on text paste input
- [#34529 – Terminal freeze on paste in Cursor integrated terminal (detailed report)]
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor