kovidgoyal/kitty · error

got a remote data response form the terminal without a curre

Error message

got a remote data response form the terminal without a current remote entry

What it means

A remote drop-data response arrived with zero coordinates (cmd.X==0 && cmd.Y==0 && cmd.Yp==0), meaning 'use the current entry', but drop_status.current_remote_entry is nil because no entry was selected yet.

Source

Thrown at kittens/dnd/drop.go:812

}

func (dnd *dnd) data_request_completed() {
	dnd.drop_status.data_requests.in_flight_count--
	if len(dnd.drop_status.data_requests.pending) > 0 && dnd.drop_status.data_requests.in_flight_count < max_inflight_data_rquests {
		dnd.lp.QueueDnDData(dnd.drop_status.data_requests.pending[0])
		dnd.drop_status.data_requests.in_flight_count++
		dnd.drop_status.data_requests.pending = dnd.drop_status.data_requests.pending[1:]
	}
}

func (dnd *dnd) on_remote_drop_data(cmd DC) (err error) {
	drop_status := &dnd.drop_status
	if drop_status.open_remote_dir == nil {
		return fmt.Errorf("got a remote data response form the terminal without an open remote dir")
	}
	if cmd.X == 0 && cmd.Y == 0 && cmd.Yp == 0 {
		if drop_status.current_remote_entry == nil {
			return fmt.Errorf("got a remote data response form the terminal without a current remote entry")
		}
	} else {
		num := utils.IfElse(cmd.Yp != 0 && cmd.Yp != 1, cmd.X, cmd.Y) - 1
		if num < 0 || num >= len(drop_status.open_remote_dir.children) {
			return fmt.Errorf("got a remote data response from the terminal for an entry that does not exist")
		}
		drop_status.current_remote_entry = drop_status.open_remote_dir.children[num]
	}
	e := drop_status.current_remote_entry
	if e.dest == nil {
		e.item_type = cmd.Xp
		switch cmd.Xp {
		case 0:
			f, err := utils.CreateExclusiveAt(e.base_dir.handle, e.name, 0o666)
			if err != nil {
				return err
			}
			e.dest = f

View on GitHub (pinned to 6d5d0c4406)

Solutions

  1. Update kitty to a version with matching kitten/terminal DnD protocol code
  2. Retry the remote drop operation
  3. Report upstream with debug logs if it persists
Defensive patterns

Strategy: type-guard

Type guard

func hasCurrentRemoteEntry(ds *drop_status) bool { return ds.current_remote_entry != nil }

Try / catch

Drop continuation frames that arrive before an entry is selected; re-request the directory listing.

Prevention

When it happens

Trigger: on_remote_drop_data receives a continuation response before any entry was set as current — protocol misuse or state desync between kitten and terminal.

Common situations: Version mismatch, responses arriving out of order, or a terminal bug sending continuation frames first.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27). Data as JSON: /api/errors/1aff7fbc60223c98. Report an issue: GitHub.