{"record":{"id":"dc38eec5ae86dbe3","repo":"kovidgoyal/kitty","slug":"must-be-run-as-kitten-diff","errorCode":null,"errorMessage":"Must be run as kitten diff","messagePattern":"Must be run as kitten diff","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"warning","filePath":"kittens/diff/main.py","lineNumber":13,"sourceCode":"#!/usr/bin/env python\n# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>\n\nimport sys\nfrom functools import partial\n\nfrom kitty.conf.types import Definition\nfrom kitty.constants import appname\nfrom kitty.simple_cli_definitions import CONFIG_HELP, CompletionSpec\n\n\ndef main(args: list[str]) -> None:\n    raise SystemExit('Must be run as kitten diff')\n\n\ndefinition = Definition(\n    '!kittens.diff',\n)\n\nagr = definition.add_group\negr = definition.end_group\nopt = definition.add_option\nmap = definition.add_map\nmma = definition.add_mouse_map\n\n# diff {{{\nagr('diff', 'Diffing')\n\nopt(\n    'syntax_aliases',\n    'pyj:py pyi:py recipe:py',","sourceCodeStart":1,"sourceCodeEnd":31,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/diff/main.py#L1-L31","documentation":"macOS rejected the notification request kitty submitted via addNotificationRequest (kitty/cocoa_window.m:572). The completion handler receives an NSError whose localizedDescription is logged; the Python callback then receives 'creation_failed'. Common causes are missing authorization or an invalid payload.","triggerScenarios":"Sending a desktop notification (kitten @send-notification or OSC 99/777) after authorization was denied or not yet granted, or with content the center rejects (missing/empty title is invalid on macOS).","commonSituations":"User denied notification permission for kitty, first-run before permission prompt is answered, or a script sending a notification with no title.","solutions":["Grant kitty notification permission in System Settings > Notifications.","Ensure notifications include a title (macOS requires one): kitten @send-notification --title '...'.","If permission is pending, trigger the permission request once and accept it.","Test with: kitten @send-notification --title test --message hello."],"exampleFix":"# before\nkitten @send-notification --message 'done'\n# after\nkitten @send-notification --title 'Build' --message 'done'","handlingStrategy":"validation","validationCode":"kitten @send-notification --title 'always include a title' --message 'body'","typeGuard":null,"tryCatchPattern":"# handle the callback result\nkitten @send-notification --title t --message m --wait-for-close; echo $?","preventionTips":["Always pass --title; macOS rejects title-less notifications.","Grant notification permission for kitty in System Settings.","Check the remote-control callback receives 'created' vs 'creation_failed'."],"tags":["kitty","macos","notifications","permission"],"backgroundTag":"notification-delivery-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}