{"record":{"id":"07589261e898d7c5","repo":"kovidgoyal/kitty","slug":"action-is-unknown-for-clear-terminal-using-rese","errorCode":null,"errorMessage":"{action} is unknown for clear_terminal, using reset","messagePattern":"(.+?) is unknown for clear_terminal, using reset","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/options/utils.py","lineNumber":258,"sourceCode":"    c_all = vals[0].lower() == 'all'\n    sign: str | None = None\n    amt = vals[1]\n    if amt[0] in '+-*/':\n        sign = amt[0]\n        amt = amt[1:]\n    return func, (c_all, sign, float(amt.strip()))\n\n\n@func_with_args('clear_terminal')\ndef clear_terminal(func: str, rest: str) -> FuncArgsType:\n    vals = rest.strip().split(maxsplit=1)\n    if len(vals) != 2:\n        log_error('clear_terminal needs two arguments, using defaults')\n        args = ['reset', True]\n    else:\n        action = vals[0].lower()\n        if action not in ('reset', 'scroll', 'scrollback', 'clear', 'to_cursor', 'to_cursor_scroll', 'last_command'):\n            log_error(f'{action} is unknown for clear_terminal, using reset')\n            action = 'reset'\n        args = [action, vals[1].lower() == 'active']\n    return func, args\n\n\n@func_with_args('copy_to_buffer')\ndef copy_to_buffer(func: str, rest: str) -> FuncArgsType:\n    return func, [rest]\n\n\n@func_with_args('paste_from_buffer')\ndef paste_from_buffer(func: str, rest: str) -> FuncArgsType:\n    return func, [rest]\n\n\n@func_with_args('paste')\ndef paste_parse(func: str, rest: str) -> FuncArgsType:\n    text = ''","sourceCodeStart":240,"sourceCodeEnd":276,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L240-L276","documentation":"The first argument to clear_terminal is not one of the recognized action names, so kitty resets it to 'reset'. The mapping still fires but performs a full terminal reset instead of the intended action.","triggerScenarios":"`map f1 clear_terminal wipe active` — 'wipe' is not in ('reset','scroll','scrollback','clear','to_cursor','to_cursor_scroll','last_command').","commonSituations":"Typos in the action name, or assuming a clear action from another terminal emulator exists in kitty.","solutions":["Correct the action name to one of: reset, scroll, scrollback, clear, to_cursor, to_cursor_scroll, last_command","Reload config (ctrl+shift+f5 or restart) after fixing to confirm the message disappears"],"exampleFix":"# before\nmap f1 clear_terminal wipe active\n# after\nmap f1 clear_terminal scrollback active","handlingStrategy":"validation","validationCode":"action = 'scrollback'\nok = action in ('reset','scroll','scrollback','clear','to_cursor','to_cursor_scroll','last_command')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep the valid action list next to you when editing maps","Run kitty --debug-config to catch silent fallbacks"],"tags":["kitty","config","terminal","parser"],"backgroundTag":"invalid-config-value","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}