fix: resolve python path in hooks + document restart requirement - #740
Closed
milla-jovovich wants to merge 1 commit into
Closed
fix: resolve python path in hooks + document restart requirement#740milla-jovovich wants to merge 1 commit into
milla-jovovich wants to merge 1 commit into
Conversation
Bugs fixed: - mempal_save_hook.sh: bare `python3` in background ingest can resolve to system python missing mempalace packages. Now resolves path first. - mempal_precompact_hook.sh: same bare python3 bug in sync ingest call. Discovered in production: nohup strips PATH, background `python3` can point to a different install than the one with sentence_transformers and chromadb. Fix: $(command -v python3) before the call. Docs: - Added "Known Limitations" section to hooks README documenting that hooks require a session restart after install (Claude Code loads settings.json once at startup). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Closing — Ben correctly identified these fixes don't apply to v3.1. The public hooks use |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
python3in background calls in both hook scripts —nohupstrips PATH sopython3can resolve to system python missing mempalace packagesWhat was happening
In long sessions, the
mempal_save_hook.shbackground ingest (python3 -m mempalace mine) would silently fail withModuleNotFoundErrorbecausenohupresolvedpython3to a different install. Fix: resolve$(command -v python3)before the call.Files changed
hooks/mempal_save_hook.sh— resolve python path before background minehooks/mempal_precompact_hook.sh— same fix for sync mine callhooks/README.md— added "Known Limitations" section about session restartTest plan
$(command -v python3)resolves correctly and has packagesThank you from Milla and Lu✨