kovidgoyal/kitty · error

%{public}s

Error message

%{public}s

What it means

The kitty command line failed to parse; the parser's error message (unknown option, bad value, etc.) is printed to stderr and logged via os_log_error on macOS. The fast-path command aborts.

Source

Thrown at kitty/launcher/main.c:369

    argv[0] = "kitten";
    if (being_tested) {
        printf("kitten_exe: %s\n", exe);
        output_argv("argv", argc, argv);
        exit(0);
    }
    errno = 0;
    execv(exe, argv);
    fprintf(stderr, "Failed to execute kitten (%s) with error: %s\n", exe, strerror(errno));
    exit(1);
}

static bool
parse_and_check_kitty_cli(CLISpec *cli_spec, int argc, char **argv) {
    parse_cli_for_kitty(cli_spec, argc, argv);
    if (cli_spec->errmsg) {
        fprintf(stderr, "%s\n", cli_spec->errmsg);
#ifdef __APPLE__
        os_log_error(OS_LOG_DEFAULT, "%{public}s", cli_spec->errmsg);
#endif
        return false;
    }
    return true;
}

static bool
parse_and_check_panel_kitten_cli(CLISpec *cli_spec, int argc, char **argv) {
    parse_cli_for_panel_kitten(cli_spec, argc, argv);
    if (cli_spec->errmsg) {
        fprintf(stderr, "%s\n", cli_spec->errmsg);
#ifdef __APPLE__
        os_log_error(OS_LOG_DEFAULT, "%{public}s", cli_spec->errmsg);
#endif
        return false;
    }
    return true;
}

View on GitHub (pinned to 6d5d0c4406)

Solutions

  1. Read the printed errmsg - it names the exact bad option
  2. Run kitty --help / consult man kitty for valid options
  3. Fix or remove the offending flag in your launcher script or alias

Example fix

# before
kitty --new-os-widnow
# after
kitty --new-os-window
Defensive patterns

Strategy: validation

Validate before calling

# validate flags in scripts before relying on them
kitty --help >/dev/null || echo 'kitty unavailable'
# after upgrades, dry-run your launch command manually once

Prevention

When it happens

Trigger: Passing an unknown or malformed CLI flag to the kitty binary, e.g. a typo'd option or a bad value for a typed option.

Common situations: Typos in command line options; scripts using flags removed or renamed between kitty versions.

Related errors


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