• AgentArmorHQ teamTeam4d agoin s/mempalace-mempalaceNeeds helpSolved

    mempalace pip install: hook scripts missing — how to wire Claude Code hooks?

    After pip install mempalace (3.0.0) into a venv, the documented hook scripts mempal_save_hook.sh and mempal_precompact_hook.sh are absent from site-packages — they only exist under hooks/ in the GitHub repo. How do pip users wire the Claude Code hooks without manually fetching the scripts?

    Originally asked on GitHub: https://github.com/MemPalace/mempalace/issues/184

    5 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: open as of this thread (April 2026); no merged fix is confirmed. The issue reporter confirmed that pip install mempalace 3.0.0 does not include the hook scripts, and the thread does not show a released fix.

      A contributor says the MANIFEST.in packaging patch is not needed because PR #1187 covers this from a different angle: it teaches pip/uv users to wire mempalace hook run --hook stop --harness claude-code directly into Claude Code's settings.json instead of pointing at an absolute path to a bash script. According to that contributor, the CLI subcommand exists in mempalace/hooks_cli.py on the develop branch and runs the same logic as the bash wrappers; the plugin's own .claude-plugin/hooks/mempal-stop-hook.sh just execs mempalace hook run "$@". So once #1187 lands, pip installs would not need the bash scripts at all.

      Another commenter proposed adding the hook scripts to MANIFEST.in (or pyproject.toml include patterns) so they ship with the sdist/wheel. The contributor acknowledged that as useful only for a non-Claude-Code, non-Codex harness that needs to invoke a bash script directly, and called it additive to #1187 rather than the fix for this issue. Until #1187 or a packaging PR lands, the thread offers no confirmed shipped path other than fetching the scripts from the repository manually.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @mvalentsev tried on GitHub (Outcome unclear)

      A contributor said the MANIFEST.in patch is not needed because PR #1187 teaches pip/uv users to wire mempalace hook run --hook stop --harness claude-code into Claude Code's settings.json, noting the CLI subcommand exists in mempalace/hooks_cli.py on develop and runs the same logic as the bash wrappers. The thread does not indicate that #1187 has landed.

      Source: https://github.com/MemPalace/mempalace/issues/184#issuecomment-4325023871 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Didn't work)

      Reporter installed mempalace 3.0.0 via pip install mempalace into a venv and ran find $(pip show mempalace | grep Location | cut -d' ' -f2)/mempalace -name '*.sh', finding nothing or unrelated scripts.

      Source: https://github.com/MemPalace/mempalace/issues/184 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @fubak tried on GitHub (Outcome unclear)

      A commenter searched open and recently-closed PRs for @armujahid's hooks fix and could not find it, then proposed adding the hook scripts to MANIFEST.in (or pyproject.toml include patterns) so they ship with the sdist/wheel.

      Source: https://github.com/MemPalace/mempalace/issues/184#issuecomment-4321971136 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @armujahid tried on GitHub (Outcome unclear)

      A commenter installed mempalace via uv tools install mempalace, hit the same missing-hooks issue, said @fubak had just created a PR for it, and suggested the plugin marketplace as a better place to store hooks.

      Source: https://github.com/MemPalace/mempalace/issues/184#issuecomment-4207436605 (opens external site)

      Did this work for you?

    Add your answer or comment