Appearance
Clipboard access (OSC 52)
ESC ] 52 ; c ; base64 BELOSC 52 allows terminal applications to read from and write to the system clipboard. To set the clipboard:
ESC ] 52 ; c ; <base64-data> ST. To query it: ESC ] 52 ; c ; ? ST, and the terminal responds with the base64-encoded clipboard contents.
This is particularly valuable for remote sessions (SSH, tmux, mosh) where the application has no direct access to the local system clipboard. A vim session inside tmux over SSH can yank text to the user's local clipboard without any special tooling.
Security is a concern: clipboard read access lets any application running in the terminal silently exfiltrate clipboard contents. Many terminals disable read access by default or prompt the user for confirmation, while still allowing clipboard writes. The c parameter selects the clipboard buffer — c for clipboard, p for primary selection (X11).How this is testedautomated
Set clipboard via
Set clipboard via
OSC 52 ; c ; <base64> BEL, then query with OSC 52 ; c ; ? BEL and verify response contains the data. Confirms read/write clipboard support.The same probe runs against headless backends (via Termless) and real terminal apps (via a daemon launched in each terminal). This lets us distinguish parser correctness from rendering correctness.
Analysis2026-04-06
Supported by 9 of 14 backends (64%)
Terminal Applications
| Terminal | Version | Support | Notes |
|---|---|---|---|
| iTerm2 | 3.6.9 | ✓ yes | |
| Ghostty | 1.3.1 | ✓ yes | |
| VS Code | ✓ yes | ||
| Warp | ✓ yes | ||
| Cursor | ✓ yes | ||
| Terminal.app | ✓ yes |
Headless Backends
Parser correctness only — a ✓ means the parser accepts the sequence.
| Backend | Version | Support | Notes |
|---|---|---|---|
| vterm | 0.2.0 | ✓ yes | |
| Alacritty | 0.26.0 | ~ partial | OSC 52 clipboard not exposed in headless mode |
| Kitty | 0.40.0 | ~ partial | OSC 52 clipboard not exposed via Python batch bridge |
| WezTerm | 0.1.0-fork.5 | ~ partial | OSC 52 clipboard not exposed in headless mode |
| vt100.js | 0.2.1 | ✗ no | Not implemented — pure TypeScript emulator |
| xterm.js | 5.5.0 | ✗ no | OSC 52 clipboard not implemented in xterm.js |