Terminal Input Handling Breaks Keyboard Shortcuts on macOS

Resolved 💬 3 comments Opened Aug 5, 2025 by btriapitsyn Closed Aug 5, 2025

Bug Description
Bug: Claude Code displays raw escape sequences instead of executing keyboard shortcuts
Environment:

Claude Code 1.0.69
macOS, zsh shell
TERM=xterm-256color

Issue:

Option+Delete and other shortcuts output escape codes like <35;96;41M<35;97;41M... instead of performing actions
Mouse movements trigger similar output
Basic text editing is broken

Impact: Cannot use standard keyboard shortcuts, making editing very difficult
Expected: Keyboard shortcuts should work normally without displaying raw escape sequences

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 1.0.69
  • Feedback ID: ea5c4805-c4fa-4ae9-be0a-1d09fee70910

Errors

[{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n    at Socket.onChildStdout (node:child_process:484:14)\n    at Socket.emit (node:events:507:28)\n    at Socket.emit (node:domain:489:12)\n    at addChunk (node:internal/streams/readable:559:12)\n    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)\n    at Readable.push (node:internal/streams/readable:390:5)\n    at Pipe.onStreamRead (node:internal/stream_base_commons:189:23)","timestamp":"2025-08-05T22:38:09.255Z"}]

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗