Skip to content

OSC 5522 advanced clipboard

Category: extensions · Baseline: rich · Tags: Operating System Commands (OSC), Kitty Extensions · Specification ↗

OSC 5522 is the Kitty advanced clipboard protocol, extending OSC 52 with MIME type support, rich content handling, and authorization tokens. When mode 5522 is enabled, bracketed paste is replaced with MIME-aware paste events that include content type metadata. Unlike OSC 52 which only handles plain text base64 data, OSC 5522 supports multiple MIME types (text/plain, text/html, image/png, etc.) in a single clipboard operation, with pre-authorization tokens for secure paste handling. Currently supported by kitty, with Ghostty parsing but not yet fully implementing the protocol.
How this is testedautomated
Query clipboard capabilities with OSC 5522;? BEL and check for response.

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 1 of 12 terminals (8%). Part of the Rich TUI baseline.

Supported by 1 of 14 backends (7%)

Terminal Applications

TerminalVersionSupportNotes
iTerm23.6.9✗ noNo OSC 5522 response
Ghostty1.3.1✗ noNo OSC 5522 response
VS Code✗ no
Warp✗ no
Cursor✗ no
Terminal.app✗ no

Headless Backends

Parser correctness only — a means the parser accepts the sequence.

BackendVersionSupportNotes
vterm0.2.0✓ yesOSC 5522 not implemented
Kitty0.40.0~ partialOSC 5522 not exposed via Python batch bridge
Alacritty0.26.0✗ noOSC 5522 not implemented in alacritty
vt100.js0.2.1✗ noNot implemented — pure TypeScript emulator
WezTerm0.1.0-fork.5✗ noOSC 5522 not implemented in wezterm
xterm.js5.5.0✗ noOSC 5522 not implemented in xterm.js