Bracketed paste leaks ESC[201~ and cuts off pastes into AI agents
A write-up shows bracketed paste mode (2004) does not protect against a fake ESC[201~ sequence: if it is in the clipboard, a terminal may pass it to agents like Claude Code, and the rest of the paste arrives as typed input. st still forwards ESC unfiltered, while xterm, Konsole and VTE strip or replace it.
- Mode 2004 wraps pastes in ESC[200~ and ESC[201~ since 2002
- st still passes ESC[201~ from the clipboard unfiltered in 2025
- xterm turns ESC into a space; Konsole strips it since 2018
- PuTTY 0.72 sent markers before data; fixed in 0.73
Read next
Security