Bug Description
MemPalace hook scripts (mempal-stop-hook.sh, mempal-precompact-hook.sh) fail on Windows because they use python3 which doesn't exist on Windows. Python is registered as python on Windows.
Error Message
/c/Users/USER/.claude/plugins/cache/mempalace/mempalace/3.0.14/hooks/mempal-stop-hook.sh: line 5: python3: command not found
Affected Files
hooks/mempal-stop-hook.sh (line 5)
hooks/mempal-precompact-hook.sh (line 5)
Current Code
echo "$INPUT" | python3 -m mempalace hook run --hook stop --harness claude-code
Suggested Fix
Use a cross-platform Python command resolution. For example:
PYTHON_CMD="${PYTHON_CMD:-$(command -v python3 2>/dev/null || command -v python 2>/dev/null)}"
echo "$INPUT" | "$PYTHON_CMD" -m mempalace hook run --hook stop --harness claude-code
Or simply use python which works on both platforms (Python 3 is now the default python on most systems).
Environment
- OS: Windows 11 Pro
- Shell: Git Bash (bash)
- Python: 3.x (available as
python, not python3)
- MemPalace version: 3.0.14
- Harness: Claude Code
Bug Description
MemPalace hook scripts (
mempal-stop-hook.sh,mempal-precompact-hook.sh) fail on Windows because they usepython3which doesn't exist on Windows. Python is registered aspythonon Windows.Error Message
Affected Files
hooks/mempal-stop-hook.sh(line 5)hooks/mempal-precompact-hook.sh(line 5)Current Code
Suggested Fix
Use a cross-platform Python command resolution. For example:
Or simply use
pythonwhich works on both platforms (Python 3 is now the defaultpythonon most systems).Environment
python, notpython3)