kovidgoyal/kitty · error
terminal responded with drag source error: %s
Error message
terminal responded with drag source error: %s
What it means
The terminal (kitty) replied to the kitten's drag-and-drop protocol handshake with an error payload instead of 'OK'. This means the terminal itself rejected or failed the drag source operation while the dnd kitten was acting as drag source.
Source
Thrown at kittens/dnd/drag.go:199
dnd.finish_drag("EIO")
return err
}
dnd.lp.QueueDnDData(DC{Type: 'P', X: -1}) // start drag
dnd.drag_status.active = true
return dnd.render_screen()
}
func (dnd *dnd) on_drag_error(cmd DC) (err error) {
payload := string(cmd.Payload)
switch payload {
case "OK":
if dnd.drag_status.active && !dnd.drag_status.terminal_accepted_drag {
dnd.drag_status.terminal_accepted_drag = true
err = dnd.render_screen()
}
default:
err = fmt.Errorf("terminal responded with drag source error: %s", payload)
}
return
}
func (dnd *dnd) reset_drag() {
for _, dr := range dnd.drag_status.data_requests {
if dr.drag_source.file != nil {
dr.drag_source.file.Close()
dr.drag_source.file = nil
}
}
if dnd.drag_status.current_remote_file != nil && dnd.drag_status.current_remote_file.file != nil {
dnd.drag_status.current_remote_file.file.Close()
}
dnd.drag_status = drag_status{}
}
func (dnd *dnd) on_drag_event(x, y, operation int) (err error) {View on GitHub (pinned to 6d5d0c4406)
Solutions
- Verify you are running the dnd kitten with a kitty version that matches/paths the drag-and-drop protocol (kitty >= 0.42 approximately)
- Update kitty to the latest version so kitten and terminal protocol agree
- If it persists, report with debug logs (kitten run with --debug-input or kitty --debug-rendering) since the payload string identifies the terminal-side error
Defensive patterns
Strategy: try-catch
Try / catch
Check the returned error from the dnd entry point; log the payload string after 'drag source error:' — it is the terminal's own diagnostic and identifies the terminal-side cause.
Prevention
- Keep kitten and kitty terminal versions in sync
- Test DnD features after every kitty upgrade
When it happens
Trigger: Occurs in on_drag_error when the terminal sends a drag-response escape sequence whose payload is not 'OK' — e.g. the terminal does not support the drag protocol, or an internal terminal-side error happened during the drag.
Common situations: Running the dnd kitten against an older kitty version that lacks drag-and-drop support, a protocol version mismatch between kitten and terminal, or a terminal-side failure while initiating the drag.
Related errors
- terminal asked for drag data from MIME list with out of boun
- terminal sent a duplicate drag data request
- terminal asked for drag data from URI list but no list prese
- This kitten should be run as: kitten quick-access-terminal
- This should be run as kitten remote_file
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/ad0d68e0fff6b54e.
Report an issue: GitHub.