kovidgoyal/kitty · error
Failed to read list of available data types in the clipboard
Error message
Failed to read list of available data types in the clipboard with error: %w
What it means
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).
Source
Thrown at kittens/clipboard/read.go:381
err = o.assign_mime_type(available_mimes, aliases)
if err != nil {
return err
}
if o.remote_mime_type == "." {
o.started = true
o.add_data(utils.UnsafeStringToBytes(strings.Join(available_mimes, "\n")))
o.all_data_received = true
} else {
requested_mimes[o.remote_mime_type] = o
}
}
if len(requested_mimes) > 0 {
lp.QueueWriteString(encode(basic_metadata, strings.Join(utils.Keys(requested_mimes), " ")))
} else {
lp.Quit(0)
}
default:
return fmt.Errorf("Failed to read list of available data types in the clipboard with error: %w", error_from_status(metadata["status"]))
}
} else {
switch metadata["status"] {
case "DATA":
current_mime := metadata["mime"]
o := requested_mimes[current_mime]
if o != nil {
if getting_data_for != current_mime {
if prev := requested_mimes[getting_data_for]; prev != nil && !prev.all_data_received {
prev.all_data_received = true
wg.Go(func() {
prev.commit()
})
}
getting_data_for = current_mime
}
if !o.all_data_received {View on GitHub (pinned to 6d5d0c4406)
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
Example fix
# before # clipboard_control = write-clipboard deny read-clipboard (EPERM inner) # after clipboard_control = write-clipboard read-clipboard
Defensive patterns
Strategy: try-catch
Validate before calling
grep -q '^clipboard_control' ~/.config/kitty/kitty.conf && grep 'read-clipboard\|read-primary' ~/.config/kitty/kitty.conf
Try / catch
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; } Prevention
- Ensure clipboard_control permits reads
- Retry on 'try again later' (EBUSY)
- Match kitty versions across ssh hops
When it happens
Trigger: `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.
Common situations: 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.
Related errors
- Failed to read data from the clipboard with error: %w
- line.decode('utf-8', 'replace').rstrip()
- Too much piped data
- Failed to read from STDIN pipe with error: %w
- Failed to create a temporary from STDIN pipe with error: %w
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/94af3a9b716f50dc.
Report an issue: GitHub.