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
- Read the printed errmsg - it names the exact bad option
- Run kitty --help / consult man kitty for valid options
- 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
- Pin kitty version in scripts and re-test flags after upgrades
- Confirm an option exists in --help before scripting it
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
- No kitten named {original_kitten_name}
- This should be run as kitten ssh
- {x} is not a valid value for {alias}. Valid values are y, ye
- Usage: kitty +runpy "some python code"
- usage: kitty +launch script.py [arguments to be passed to sc
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/c5f90c73c24ed9a2.
Report an issue: GitHub.