Description
keep put with long inline text (as first positional argument) crashes with OSError: [Errno 63] File name too long before content detection recognizes it as inline text.
Steps to reproduce
keep put "This is a long note with many words that exceeds the filesystem path length limit and triggers the Path.is_dir check before content type detection can identify it as inline text rather than a file path" -t topic=test
Expected behavior
Long inline text should be recognized as content (not a file path) and stored normally.
Actual behavior
File "keep/cli_app.py", line 1085, in put
elif Path(source).is_dir():
File "pathlib.py", line 876, in is_dir
return S_ISDIR(self.stat().st_mode)
OSError: [Errno 63] File name too long
The code path at cli_app.py:1085 calls Path(source).is_dir() before checking whether source is inline content. When the string exceeds the OS path length limit (~255 bytes on macOS), stat() raises OSError instead of returning False.
Workaround
Use the MCP keep_flow(state="put", ...) path, which works correctly.
Version
keep-skill 0.136.8, macOS (Darwin 25.5.0)
Description
keep putwith long inline text (as first positional argument) crashes withOSError: [Errno 63] File name too longbefore content detection recognizes it as inline text.Steps to reproduce
keep put "This is a long note with many words that exceeds the filesystem path length limit and triggers the Path.is_dir check before content type detection can identify it as inline text rather than a file path" -t topic=testExpected behavior
Long inline text should be recognized as content (not a file path) and stored normally.
Actual behavior
The code path at
cli_app.py:1085callsPath(source).is_dir()before checking whethersourceis inline content. When the string exceeds the OS path length limit (~255 bytes on macOS),stat()raisesOSErrorinstead of returningFalse.Workaround
Use the MCP
keep_flow(state="put", ...)path, which works correctly.Version
keep-skill 0.136.8, macOS (Darwin 25.5.0)