Skip to content

Semantic prompts (OSC 133)

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

ESC ] 133 ; A BEL
Semantic prompts use OSC 133 markers to tell the terminal where each shell prompt, command input, and command output begins and ends. The markers are: A (prompt start), B (command input start — after prompt, before the user types), C (command output start — after Enter), and D (command finished, with exit code). With these markers, terminals can implement features that were previously impossible: click-to-navigate between prompts, select entire command output, scroll by command boundaries, mark failed commands with a red indicator, and provide command completion times. Shell integration scripts (for bash, zsh, fish) emit these markers automatically. Also known as shell integration or command decoration. Supported by iTerm2 (which originated the protocol), Ghostty, WezTerm, Kitty, and VS Code's integrated terminal.
How this is testedautomated
Send OSC 133 ; A BEL (prompt start marker) and verify the terminal accepts it without error.

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 12 terminals (75%). Not supported by: vt100.js, Alacritty, xterm.js. Part of the Rich TUI baseline. Notes: vt100.js: Not implemented — pure TypeScript emulator; Alacritty: Not implemented in alacritty; xterm.js: Not implemented in xterm.js.

Supported by 10 of 14 backends (71%)

Terminal Applications

TerminalVersionSupportNotes
iTerm23.6.9✓ yes
Ghostty1.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.

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