{"record":{"id":"07851d17326af384","repo":"kovidgoyal/kitty","slug":"s-07851d","errorCode":null,"errorMessage":"%s","messagePattern":"%s","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tools/cmd/at/main.go","lineNumber":289,"sourceCode":"\t}\n\twid, err := strconv.Atoi(os.Getenv(\"KITTY_WINDOW_ID\"))\n\tif err == nil && wid > 0 {\n\t\tio_data.rc.KittyWindowId = uint(wid)\n\t}\n\terr = create_serializer(global_options.password, \"\", io_data)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar response *Response\n\tresponse, err = get_response(utils.IfElse(global_options.to_network == \"\", do_tty_io, do_socket_io), io_data)\n\tif err != nil || response == nil {\n\t\treturn\n\t}\n\tif !response.Ok {\n\t\tif response.Traceback != \"\" {\n\t\t\tfmt.Fprintln(os.Stderr, response.Traceback)\n\t\t}\n\t\treturn fmt.Errorf(\"%s\", response.Error)\n\t}\n\tif io_data.handle_response != nil {\n\t\treturn io_data.handle_response(utils.UnsafeStringToBytes(response.Data.as_str))\n\t}\n\tif response.Data.is_string && io_data.string_response_is_err {\n\t\treturn fmt.Errorf(\"%s\", response.Data.as_str)\n\t}\n\tif response.Data.as_str != \"\" {\n\t\tfmt.Println(strings.TrimRight(response.Data.as_str, \"\\n \\t\"))\n\t}\n\treturn\n}\n\nfunc get_password(password string, password_file string, password_env string, use_password string) (ans password, err error) {\n\tif use_password == \"never\" {\n\t\treturn\n\t}\n\tif password != \"\" {","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/tools/cmd/at/main.go#L271-L307","documentation":"The remote control command executed inside kitty and returned ok:false; kitty @ surfaces the server-side error string (after printing any Python traceback to stderr). The message content is whatever error the in-kitty command raised.","triggerScenarios":"Any @ command whose handler fails in kitty: e.g. 'kitty @ set-colors nosuchfile.conf', invalid window ids, 'kitty @ focus-window --match id:999', etc. response.Ok is false and response.Error is propagated.","commonSituations":"Invalid arguments to @ subcommands, matching expressions that match no windows/tabs, files that don't exist, or attempting actions not permitted by the current remote control policy.","solutions":["Read the printed traceback/Error text — it names the real cause (bad match, missing file, invalid value)","Fix the argument, e.g. verify window ids with 'kitty @ ls'","For permission failures, adjust --allow-remote-control / remote_control policy in kitty.conf"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"out, _ := cmd.CombinedOutput() // captures stderr traceback alongside the error","typeGuard":null,"tryCatchPattern":"if err := run_CMD_NAME(...); err != nil { log.Printf(\"kitty RC error: %v\", err) /* inspect response.Error and traceback */ }","preventionTips":["Validate window ids/matches with 'kitty @ ls' first","Read the printed traceback for root cause"],"tags":["kitty","remote-control","command-failed"],"backgroundTag":"remote-command-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}