Feature request: Kitty graphics protocol support in statusLine API
Summary
The statusLine API currently passes through ANSI color/style escape sequences but silently strips Kitty graphics protocol APC sequences (\x1b_G...). This prevents statusLine plugins from rendering images in the terminal.
Use Case
I'm building claude-pet, a terminal companion pet for Claude Code. It renders animated pixel art sprites alongside a metrics bar (context %, cost, rate limits). The sprites are designed to appear in the statusLine area.
What Works
- ANSI color codes in statusLine stdout → rendered correctly
- OSC 8 hyperlinks → rendered correctly
- Text + Unicode characters → rendered correctly
What Doesn't Work
- Kitty graphics protocol sequences (
\x1b_Ga=T,f=100,...) in stdout → silently stripped - Writing Kitty graphics to the parent TTY fd directly → images render behind Ink's text layer and are not visible
Investigation
I've done extensive testing:
- Kitty images persist through all terminal operations in Ghostty (CSI 2K, CSI 0J, space overwrite, scroll)
- Images written to the parent TTY arrive at the terminal but are visually hidden behind Ink's managed text layer
- Kitty's z-index parameter is not effective in Ghostty
- APC sequences embedded in statusLine stdout are stripped before reaching the terminal
Proposed Solutions (in order of preference)
Option A: Pass through APC sequences in statusLine output
Allow Kitty graphics APC sequences to survive from statusLine stdout → Ink render → terminal. Since Ink re-renders periodically, the image would be re-emitted each cycle and persist.
Option B: Add an image field to the statusLine API
{
"type": "command",
"command": "node my-statusline.js",
"image": true // enable image passthrough
}
Option C: Expose a graphics layer API
Let statusLine plugins output structured image data that Claude Code renders via a dedicated Kitty graphics layer, outside Ink's managed region.
Environment
- Claude Code v2.1.83
- Ghostty terminal (Kitty graphics protocol supported)
- macOS
References
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗