kovidgoyal/kitty · error
Terminal does not support querying the: %s
Error message
Terminal does not support querying the: %s
What it means
The choose_fonts kitten queries the terminal for capabilities (font_size, cell width/height, etc.) and expects a valid response. If the terminal answers with an invalid/unsupported indicator, this error is returned. It typically means the terminal is not kitty or lacks the required private query modes.
Source
Thrown at kittens/choose_fonts/ui.go:117
h.lp.WakeupMainThread()
}()
h.draw_screen()
return
}
func (h *handler) finalize() {
if h.temp_dir != "" {
os.RemoveAll(h.temp_dir)
h.temp_dir = ""
}
h.lp.SetCursorVisible(true)
h.lp.SetCursorShape(loop.BLOCK_CURSOR, true)
h.graphics_manager.finalize()
}
func (h *handler) on_query_response(key, val string, valid bool) error {
if !valid {
return fmt.Errorf("Terminal does not support querying the: %s", key)
}
set_float := func(k, v string, dest *float64) error {
if fs, err := strconv.ParseFloat(v, 64); err == nil {
*dest = fs
} else {
return fmt.Errorf("Invalid response from terminal to %s query: %#v", k, v)
}
return nil
}
switch key {
case "font_size":
if err := set_float(key, val, &h.text_style.Font_sz); err != nil {
return err
}
case "dpi_x":
if err := set_float(key, val, &h.text_style.Dpi_x); err != nil {
return err
}View on GitHub (pinned to 6d5d0c4406)
Solutions
- Run the kitten inside kitty itself
- If under tmux/screen, enable escape passthrough or run kitty directly outside the multiplexer
- Update kitty — older versions lack some query support
Defensive patterns
Strategy: validation
Validate before calling
// verify TERM_PROGRAM=kitty before launching the kitten
if os.Getenv("TERM_PROGRAM") != "kitty" { return errors.New("run inside kitty") } Try / catch
if err := h.on_query_response(k, v, valid); err != nil { fmt.Fprintln(os.Stderr, "terminal lacks query support:", err); os.Exit(1) } Prevention
- Run kittens inside kitty, not other terminals
- Avoid nesting kittens under tmux/screen without passthrough
When it happens
Trigger: Running the choose_fonts kitten inside a terminal that does not implement kitty's font-size/cell-size query escape sequences, or where a query response arrives marked invalid.
Common situations: Running kitty kittens inside tmux/screen without proper passthrough, or in another terminal emulator (gnome-terminal, xterm) via the kitten CLI; nested sessions mangling DCS responses.
Related errors
- Failed to find the kitty executable, this kitten requires th
- Trying to send data when to pipe is nil
- Could not encode message to kitty with error: %w
- Failed to send message to kitty with I/O error: %w
- The font specification %s is invalid as %s does not contain
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/e6121ac7a502a431.
Report an issue: GitHub.