{"record":{"id":"94af3a9b716f50dc","repo":"kovidgoyal/kitty","slug":"failed-to-read-list-of-available-data-types-in-the","errorCode":null,"errorMessage":"Failed to read list of available data types in the clipboard with error: %w","messagePattern":"Failed to read list of available data types in the clipboard with error: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kittens/clipboard/read.go","lineNumber":381,"sourceCode":"\t\t\t\t\terr = o.assign_mime_type(available_mimes, aliases)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tif o.remote_mime_type == \".\" {\n\t\t\t\t\t\to.started = true\n\t\t\t\t\t\to.add_data(utils.UnsafeStringToBytes(strings.Join(available_mimes, \"\\n\")))\n\t\t\t\t\t\to.all_data_received = true\n\t\t\t\t\t} else {\n\t\t\t\t\t\trequested_mimes[o.remote_mime_type] = o\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif len(requested_mimes) > 0 {\n\t\t\t\t\tlp.QueueWriteString(encode(basic_metadata, strings.Join(utils.Keys(requested_mimes), \" \")))\n\t\t\t\t} else {\n\t\t\t\t\tlp.Quit(0)\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"Failed to read list of available data types in the clipboard with error: %w\", error_from_status(metadata[\"status\"]))\n\t\t\t}\n\t\t} else {\n\t\t\tswitch metadata[\"status\"] {\n\t\t\tcase \"DATA\":\n\t\t\t\tcurrent_mime := metadata[\"mime\"]\n\t\t\t\to := requested_mimes[current_mime]\n\t\t\t\tif o != nil {\n\t\t\t\t\tif getting_data_for != current_mime {\n\t\t\t\t\t\tif prev := requested_mimes[getting_data_for]; prev != nil && !prev.all_data_received {\n\t\t\t\t\t\t\tprev.all_data_received = true\n\t\t\t\t\t\t\twg.Go(func() {\n\t\t\t\t\t\t\t\tprev.commit()\n\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tgetting_data_for = current_mime\n\t\t\t\t\t}\n\t\t\t\t\tif !o.all_data_received {","sourceCodeStart":363,"sourceCodeEnd":399,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/clipboard/read.go#L363-L399","documentation":"During the initial handshake, when the peer responds to the available-MIME-types request with a status other than OK/DATA/DONE, the wrapped error_from_status result is reported as a failure to read the list of available data types. The inner message identifies the underlying status (ENOSYS, EPERM, EBUSY, or an unknown string).","triggerScenarios":"`kitten clipboard get ...` where the answering terminal/client replies with an error status to the capability/list query — permission denied (EPERM), unsupported selection (ENOSYS), busy (EBUSY), or an unrecognized status via the default branch.","commonSituations":"kitty.conf clipboard_control forbidding read-clipboard (yields EPERM); terminals not implementing the kitty clipboard protocol; concurrent access returning EBUSY; version-mismatched peers sending unknown statuses.","solutions":["Read the inner error message and address that specific status (approve prompt / enable read access / retry / update)","Ensure clipboard_control in kitty.conf permits read access, e.g. `clipboard_control write-clipboard read-clipboard`","Retry on EBUSY; update kitty on both ends for unknown statuses","Confirm the terminal actually supports the kitty clipboard protocol"],"exampleFix":"# before\n# clipboard_control = write-clipboard deny read-clipboard  (EPERM inner)\n# after\nclipboard_control = write-clipboard read-clipboard","handlingStrategy":"try-catch","validationCode":"grep -q '^clipboard_control' ~/.config/kitty/kitty.conf && grep 'read-clipboard\\|read-primary' ~/.config/kitty/kitty.conf","typeGuard":null,"tryCatchPattern":"out=$(kitten clipboard get f 2>&1) || { echo \"$out\"; case \"$out\" in *denied*) exit 3;; *try again*) sleep 1; exec kitten clipboard get f;; esac; exit 1; }","preventionTips":["Ensure clipboard_control permits reads","Retry on 'try again later' (EBUSY)","Match kitty versions across ssh hops"],"tags":["kitty","clipboard","handshake","protocol-status"],"backgroundTag":"clipboard-read-denied","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}