{"record":{"id":"1e711d4c7680bb6a","repo":"kovidgoyal/kitty","slug":"received-empty-response-from-kitty","errorCode":null,"errorMessage":"Received empty response from kitty","messagePattern":"Received empty response from kitty","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tools/cmd/at/main.go","lineNumber":244,"sourceCode":"\tif err != nil {\n\t\tif errors.Is(err, os.ErrDeadlineExceeded) && io_data.rc.Async != \"\" {\n\t\t\tio_data.rc.Payload = nil\n\t\t\tio_data.rc.CancelAsync = true\n\t\t\tio_data.multiple_payload_generator = nil\n\t\t\tio_data.rc.NoResponse = true\n\t\t\tio_data.chunks_done = false\n\t\t\t_, _ = do_io(io_data)\n\t\t\terr = fmt.Errorf(\"Timed out waiting for a response from kitty\")\n\t\t}\n\t\treturn nil, err\n\t}\n\tif len(serialized_response) == 0 {\n\t\tif io_data.rc.NoResponse {\n\t\t\tres := Response{Ok: true}\n\t\t\tans = &res\n\t\t\treturn\n\t\t}\n\t\terr = fmt.Errorf(\"Received empty response from kitty\")\n\t\treturn\n\t}\n\tvar response Response\n\terr = json.Unmarshal(serialized_response, &response)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"Invalid response received from kitty, unmarshalling error: %w\", err)\n\t\treturn\n\t}\n\tans = &response\n\treturn\n}\n\nvar running_shell = false\n\ntype exit_error struct {\n\texit_code int\n}\n","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/tools/cmd/at/main.go#L226-L262","documentation":"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.","triggerScenarios":"get_response reads serialized_response; if its length is 0 and io_data.rc.NoResponse is false, this error is returned.","commonSituations":"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.","solutions":["Confirm kitty is still running and healthy","Update kitty so the CLI and the terminal are the same version","Retry the command; if it persists, restart kitty and re-enable remote control","Check that no proxy/multiplexer is truncating the unix/ssh channel"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"empty response\") { /* check kitty alive, then retry */ }","preventionTips":["Confirm kitty is running before sending RC commands","Keep CLI and terminal versions in sync"],"tags":["kitty","remote-control","empty-response"],"backgroundTag":"empty-response-body","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}