Status line: opt-in passthrough region for pixel protocols (Sixel/Kitty)
Summary
A statusLine command's stdout is tokenized and re-rendered inside Claude Code's own cell grid, so only text, SGR colour and OSC 8 survive — DCS (Sixel) and APC (the Kitty graphics protocol) are dropped. The status line is therefore capped at two colours per character cell.
Pixels are nonetheless reachable out-of-band, by writing a pixel protocol straight to the terminal device — a bypass that community projects already ship. That bypass works but races Claude Code's TUI repaints and can't reserve space or coordinate with the host. This requests a small opt-in region so rich/pixel status lines become a safe, first-class contract instead of a hack.
What crosses the status-line boundary today
A statusLine's stdout runs through a VT tokenizer (CSI/OSC/DCS/APC/PM/SOS states) and is re-rendered as cells:
| Class | Example | Reaches the terminal? |
|---|---|---|
| SGR colour (CSI m) | \e[38;2;r;g;bm | Yes, re-rendered |
| OSC 8 hyperlink | \e]8;;url\e\ | Yes (special-cased) |
| OSC set title (0/2) | \e]0;title\a | No |
| DCS / Sixel | \ePq…\e\ | No |
| APC / Kitty graphics | \e_G…\e\ | No |
| CSI cursor / erase, DEC private modes, C1 | \e[2J, \e[?25l, 0x9b | No |
This is a sound default (a misbehaving script can't corrupt the UI), but it rules out pixel-art status lines, inline charts/sparklines, and progress visualizers even on terminals that could render them.
Pixels are already reachable out-of-band (the real argument)
A status-line process can bypass stdout and write to the terminal device directly:
- POSIX:
andywxy1/claude-petwalks the process tree (ps -o tty=), opens/dev/<tty>, and writes Kitty graphics there. Ships today. - Windows: the same idea works through
CONOUT$(the/dev/ttyanalogue). I verified it in WezTerm: a status-line-style process with stdout redirected writes a Sixel and a Kitty image toCONOUT$and the terminal renders it — real pixel art, zero dependencies. (Node must delegate the raw write, e.g.cmd /c type file > CONOUT$, because libuv routes console writes throughWriteConsoleW, which ConPTY won't pass through; a rawWriteFilepasses fine.)
So the ceiling is already broken — but only by going around Claude Code, which races the TUI's repaints, can't reserve rows, and can corrupt the display. That fragility is the case for a sanctioned region.
Proposal: an opt-in passthrough region
"statusLine": { "type": "command", "command": "...", "rows": 8, "passthrough": true }
With passthrough, Claude Code reserves rows rows at the bottom, does no tokenizing/width accounting on that region, and writes the script's bytes to the terminal verbatim, restoring cursor state around them. Default behaviour is unchanged. The script owns those rows and guarantees it stays within them — the same contract a full-screen app has with the alternate screen — so the host only fences the region (save/restore cursor, clip scroll).
Demo & evidence
A working golf status line (cell art today) plus the full TTY/CONOUT$ pixel bypass, documented with method and frames (Sixel and Kitty rendering in WezTerm on Windows):
- https://github.com/AlrightLad/custom-claude-code-terminal
docs/TTY-BYPASS.md(POSIX study),docs/TTY-BYPASS-WINDOWS.md(Windows, tested)- Frames:
docs/frames/tty-bypass-sixel-wezterm.png,docs/frames/tty-bypass-kitty-wezterm.png
Workaround without any host change
Half-block / sextant cell art in 24-bit colour — works in every terminal, needs nothing new. This request only raises the ceiling for Sixel/Kitty terminals, behind an explicit opt-in.