kovidgoyal/kitty · error · SystemExit

This should be run as kitten resize-window

Error message

This should be run as kitten resize-window

What it means

Same failure class as the subdirectory case but at the top-level per-URI staging directory: mkdirat for '<base_dir>/<uri_item_idx>' failed with a non-EEXIST errno, so the drag source setup aborts. Each dropped/promise URI gets its own numbered directory under the base dir.

Source

Thrown at kittens/resize_window/main.py:23

OPTIONS = r"""
--horizontal-increment
default=2
type=int
The base horizontal increment.


--vertical-increment
default=2
type=int
The base vertical increment.
""".format
help_text = 'Resize the current window'
usage = ''


def main(args: list[str]) -> None:
    raise SystemExit('This should be run as kitten resize-window')


if __name__ == '__main__':
    main(sys.argv)
elif __name__ == '__doc__':
    cd = sys.cli_docs  # type: ignore
    cd['usage'] = usage
    cd['options'] = OPTIONS
    cd['help_text'] = help_text
    cd['short_desc'] = 'Resize the current window interactively'

View on GitHub (pinned to 6d5d0c4406)

Solutions

  1. Free space on the filesystem holding the staging base dir and confirm kitty can write there
  2. Retry the drag — a base dir removed by tmp cleaners between operations is transient
  3. Raise the process fd limit (ulimit -n) if dragging many simultaneous items
Defensive patterns

Strategy: validation

Validate before calling

# Check base dir health before promising drag items
import os, shutil
base = drag_base_dir()
if not os.path.isdir(base) or not os.access(base, os.W_OK):
    raise IOError('drag staging base dir missing or read-only')

Prevention

When it happens

Trigger: Creating the per-item staging directory (e.g. /tmp/kitty-drag-.../0) fails due to ENOSPC, EACCES, EMFILE, or a stale/removed base directory fd.

Common situations: Disk full or /tmp cleaned out (systemd-tmpfiles) mid-operation; kitty lacking write permission to XDG_RUNTIME_DIR/tmp; fd limits hit when dragging many items.

Related errors


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