Also via right-click → Paste. Both paths go through the same check — no shortcut jumps the queue.
The rule
Every pasted text goes through three questions, in this order:1
The terminator is stripped — always
The
ESC[201~ sequence is torn out of the text before anything else, on every paste, risky or not. It’s what marks “the paste is over” in the terminal protocol: text carrying it convinces the shell that the paste ended there, and that the rest — whatever comes after — is you typing.That’s how you paste one innocent-looking line that executes a command you never saw. TYBA doesn’t let that byte reach the shell. Ever.2
Is the terminal in bracketed paste?
TYBA reads the terminal’s actual state at that moment — not a guess, not a preference of yours. Either the program on the other side turned the mode on, or it didn’t.
3
Is this risky?
It’s risky if any of these is true:
- The text has unsafe control characters; or
- The text is multiline and bracketed paste is off.
What bracketed paste is
It’s a mode the terminal program turns on by itself to say: “I know how to tell pasted text from typed text”. With it on, pasted text reaches the program wrapped in markers. Line breaks arrive as text, not as Enter. A modern shell (zsh, bash with a recent readline), Claude Code,vim — they all turn it on. A raw bash without readline, a script’s read, a simple program asking for input — they don’t.
A control character always opens the dialog, even with bracketed paste on and even on a single line. Bracketed paste protects against the accidental Enter; it doesn’t protect against an
ESC in the middle of the text.The dialog
Title: Paste multiple lines? It gives you exactly what you need to decide:
You read what you’re about to paste. That’s the point.
The three ways out
Paste as a single line is the way out for the most common case: you copied a command that wrapped across three lines on a documentation site and you want it back in one piece. It isn’t a generic “safe mode” — it’s a flattening, and the result is still a command you’re going to run.
What this isn’t
What doesn’t exist
See also
Risk classification
Green, yellow, red — what agents are allowed to run.
Using the terminal
The other side: selecting and copying.