Appearance
Report text area size in chars (CSI 18 t)
ESC [ 18 tXTWINOPS subcode 18 queries the dimensions of the terminal text area in character cells. The query is
CSI 18 t; the response is CSI 8 ; rows ; cols t. This is functionally equivalent to TIOCGWINSZ and the COLUMNS/LINES environment variables, but works in-band over the TTY without requiring ioctl access — useful for SSH sessions, multiplexers, and any context where the local environment may not match the visible terminal.
This is one of the most widely supported XTWINOPS subcodes because it answers a fundamental question (how big is the terminal?) without exposing pixel dimensions or window manipulation. Many shell scripts and TUI frameworks use it as a fallback when ioctl is unavailable.How this is testedautomated
Send
Send
\x1b[18t, verify response matches CSI 8 ; rows ; cols t.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 6 of 14 backends (43%)
Terminal Applications
| Terminal | Version | Support | Notes |
|---|---|---|---|
| iTerm2 | 3.6.9 | ✓ yes | 25 rows x 80 cols |
| Ghostty | 1.3.1 | ✓ yes | 119 rows x 270 cols |
| Terminal.app | 2.15 | ✓ yes | 24 rows x 80 cols |
| Kitty | 0.46.2 | ✓ yes | Window operations not exposed via Python batch bridge |
| VS Code | 1.113.0 | ? unknown | |
| Warp | 0.2026.03.18.08.24.03 | ? unknown | |
| Cursor | 2.6.21 | ? unknown |
Headless Backends
Parser correctness only — a ✓ means the parser accepts the sequence.
| Backend | Version | Support | Notes |
|---|---|---|---|
| Alacritty | 0.26.0 | ~ partial | Text area size report not exposed in headless mode |
| WezTerm | 0.1.0-fork.5 | ~ partial | Text area size report not exposed in headless mode |
| xterm.js | 5.5.0 | ~ partial | Text area size report not exposed in xterm.js headless mode |
| vt100.js | 0.2.1 | ✗ no | XTWINOPS not implemented — post-dates VT220 baseline |
| vterm | 0.2.0 | ✗ no | XTWINOPS text area size report not implemented in vterm.js |