{"record":{"id":"33d0afeaa9201d1e","repo":"kovidgoyal/kitty","slug":"timed-out-waiting-for-a-response-from-kitty","errorCode":null,"errorMessage":"Timed out waiting for a response from kitty","messagePattern":"Timed out waiting for a response from kitty","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tools/cmd/at/main.go","lineNumber":234,"sourceCode":"\t\t\tself.chunks_done = true\n\t\t}\n\t\treturn self.serializer(self.rc)\n\t}\n\tself.chunks_done = true\n\treturn self.serializer(self.rc)\n}\n\nfunc get_response(do_io func(io_data *rc_io_data) ([]byte, error), io_data *rc_io_data) (ans *Response, err error) {\n\tserialized_response, err := do_io(io_data)\n\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}","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/tools/cmd/at/main.go#L216-L252","documentation":"kitty @ sent a remote control command and heard nothing back before the response timeout elapsed. After cancelling the async request it reports this timeout, meaning kitty never answered (busy, socket dead, or command genuinely long-running).","triggerScenarios":"send_rc_command waits on get_response; if the response channel times out (default timeout reached, or a timeout set via --response-timeout), the error is raised and the request is cancelled.","commonSituations":"Very slow commands (e.g. getting a large screenshot or launching apps) exceeding the default 10s timeout, kitty frozen/busy, the remote control socket connection silently dropped, or network latency when forwarding over ssh.","solutions":["Increase the timeout with --response-timeout (seconds) for slow commands like get-screenshot or launch","Verify kitty is responsive and remote control is enabled (--allow-remote-control)","If over ssh, check the connection is alive and the env is forwarded","Re-run the command; transient stalls during heavy GPU load can cause this"],"exampleFix":"# before\nkitty @ get-screenshot\n# after\nkitty @ --response-timeout=60 get-screenshot","handlingStrategy":"retry","validationCode":"kitty @ --response-timeout=60 <cmd>","typeGuard":null,"tryCatchPattern":"if err := send_rc_command(...); err != nil && strings.Contains(err.Error(), \"Timed out\") { time.Sleep(time.Second); /* retry once */ }","preventionTips":["Set --response-timeout generously for slow commands (screenshot, launch)","Verify kitty is responsive before issuing commands"],"tags":["kitty","remote-control","timeout"],"backgroundTag":"command-response-timeout","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}