kovidgoyal/kitty · error

Received empty response from kitty

Error message

Received empty response from kitty

What it means

kitty @ received a zero-length response from the remote control channel. Since the command did not opt into NoResponse, an empty payload is invalid — kitty should always return a JSON envelope.

Solutions

  1. Confirm kitty is still running and healthy
  2. Update kitty so the CLI and the terminal are the same version
  3. Retry the command; if it persists, restart kitty and re-enable remote control
  4. Check that no proxy/multiplexer is truncating the unix/ssh channel
Defensive patterns

Strategy: retry

Try / catch

if err != nil && strings.Contains(err.Error(), "empty response") { /* check kitty alive, then retry */ }

Prevention

When it happens

Trigger: get_response reads serialized_response; if its length is 0 and io_data.rc.NoResponse is false, this error is returned.

Common situations: The remote control socket closing mid-exchange, a version mismatch between kitty @ and kitty corrupting the framing, or the kitty process dying while handling the command.

Related errors


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

Appendix: source

Thrown at tools/cmd/at/main.go:244

	if err != nil {
		if errors.Is(err, os.ErrDeadlineExceeded) && io_data.rc.Async != "" {
			io_data.rc.Payload = nil
			io_data.rc.CancelAsync = true
			io_data.multiple_payload_generator = nil
			io_data.rc.NoResponse = true
			io_data.chunks_done = false
			_, _ = do_io(io_data)
			err = fmt.Errorf("Timed out waiting for a response from kitty")
		}
		return nil, err
	}
	if len(serialized_response) == 0 {
		if io_data.rc.NoResponse {
			res := Response{Ok: true}
			ans = &res
			return
		}
		err = fmt.Errorf("Received empty response from kitty")
		return
	}
	var response Response
	err = json.Unmarshal(serialized_response, &response)
	if err != nil {
		err = fmt.Errorf("Invalid response received from kitty, unmarshalling error: %w", err)
		return
	}
	ans = &response
	return
}

var running_shell = false

type exit_error struct {
	exit_code int
}

View on GitHub (pinned to 6d5d0c4406)