kovidgoyal/kitty · error

Terminal does not support querying the

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.

Solutions

  1. Run the kitten inside kitty itself
  2. If under tmux/screen, enable escape passthrough or run kitty directly outside the multiplexer
  3. 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

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


AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27). Data as JSON: /api/errors/e6121ac7a502a431. Report an issue: GitHub.

Appendix: 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)