Skip to main content
Pasting into a terminal is the most dangerous thing you do without thinking. Text copied from a web page can end with a line break — and a line break, in a shell, is Enter. The command runs before you read it. TYBA doesn’t solve this by asking for confirmation every time (you’d learn to click “Paste” without reading in two days). It asks when the text can run on its own, and shuts up when it can’t. Also via right-clickPaste. 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.
Risky opens the dialog. Everything else pastes straight through.

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.
The same paste behaves differently in different places — and that’s the thing working.Pasting 20 lines inside Claude Code: nothing happens, the text goes into the prompt. It turns bracketed paste on, so the 20 lines can’t run on their own.Pasting the same 20 lines into a raw bash that didn’t turn the mode on: the dialog opens. There, every line break is an Enter — that’s 20 commands, and TYBA isn’t going to let that happen silently.It isn’t random. It isn’t TYBA “being annoying sometimes”. It’s the right answer to two different contexts.
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.
Once you choose, focus goes back to the terminal.

What this isn’t

The paste check looks at the shape of the text: can it run on its own? It does not judge what the command does. rm -rf / pasted on a single line, with no control characters, pastes straight through and in silence — to the check, it’s a command waiting for your Enter, and you’re the one pressing it.What judges what a command does is risk classification, and that applies to what agents ask to run. Pasting is you. The responsibility stays yours.

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.