fix: disambiguate hook block reasons to name MemPalace explicitly#666
Merged
bensig merged 1 commit intoMemPalace:mainfrom Apr 12, 2026
Merged
Conversation
Replace "your memory system" with explicit MemPalace references and tool names (mempalace_diary_write, mempalace_add_drawer, mempalace_kg_add) in stop and precompact hook block reasons. This prevents Claude Code from misinterpreting the hook as a native auto-memory save instruction. Updated in both Python (hooks_cli.py) and standalone shell scripts. Also fix CONTRIBUTING.md Getting Started to show the fork-first workflow, matching the PR Guidelines section.
This was referenced Apr 12, 2026
jphein
added a commit
to jphein/mempalace
that referenced
this pull request
Apr 12, 2026
…uto-memory Block reasons now: - Name "(MemPalace)" explicitly to avoid confusion with auto-memory - Add mempalace_kg_add as optional step 3 - Explicitly say "Do NOT write to Claude Code's native auto-memory (.md files)" Addresses the same root cause as MemPalace#666: Claude's auto-memory system prompt can dominate generic "save to your memory system" instructions. Co-Authored-By: Claude Opus 4.6 <[email protected]>
jphein
added a commit
to jphein/mempalace
that referenced
this pull request
Apr 12, 2026
…uto-memory Block reasons now: - Name "(MemPalace)" explicitly to avoid confusion with auto-memory - Add mempalace_kg_add as optional step 3 - Explicitly say "Do NOT write to Claude Code's native auto-memory (.md files)" Addresses the same root cause as MemPalace#666: Claude's auto-memory system prompt can dominate generic "save to your memory system" instructions. Co-Authored-By: Claude Opus 4.6 <[email protected]>
6 tasks
bensig
approved these changes
Apr 12, 2026
Collaborator
bensig
left a comment
There was a problem hiding this comment.
Code review clean, CI all green.
jphein
added a commit
to jphein/mempalace
that referenced
this pull request
Apr 12, 2026
…n conflicts Merge upstream/develop: MemPalace#177, MemPalace#361, MemPalace#449, MemPalace#450 (benchmarks, tilde expand, duplicate cache vars, test fixture cleanup). Merge upstream/main: MemPalace#666 (z3tz3r0's block reason disambiguation). Conflict resolution: keep our scoped "For THIS save" phrasing instead of MemPalace#666's absolute "Do NOT write to auto-memory" — both memory systems are used in tandem. Also drop "AAAK-compressed" from diary instructions since diary_write is plain text, not AAAK dialect. Co-Authored-By: Claude Opus 4.6 <[email protected]>
3 tasks
bensig
added a commit
that referenced
this pull request
Apr 13, 2026
* fix: disambiguate hook block reasons to name MemPalace explicitly (#666) Replace "your memory system" with explicit MemPalace references and tool names (mempalace_diary_write, mempalace_add_drawer, mempalace_kg_add) in stop and precompact hook block reasons. This prevents Claude Code from misinterpreting the hook as a native auto-memory save instruction. Updated in both Python (hooks_cli.py) and standalone shell scripts. Also fix CONTRIBUTING.md Getting Started to show the fork-first workflow, matching the PR Guidelines section. * fix: remove chromadb <0.7 upper bound — blocks 1.x installs The current constraint `chromadb>=0.5.0,<0.7` forces pip to install chromadb 0.6.x, but palaces created with chromadb 1.x (which is what the mempalace dev environment actually uses — 1.5.7 per uv.lock) have an incompatible SQLite schema. Specifically, chromadb 0.6.x fails with `KeyError: '_type'` when opening a collection written by 1.x. This means a fresh `pip install mempalace` gives users a chromadb version that cannot read palaces created in the maintainer's own environment. The fix removes the upper bound so pip can resolve to the current stable chromadb release. Reproduction: python3 -m venv .venv && source .venv/bin/activate pip install mempalace # installs chromadb 0.6.3 # Try opening a palace created with chromadb 1.x: # -> _get_collection() returns None, tool_status() returns "No palace found" pip install chromadb==1.5.7 # force upgrade # -> tool_status() returns real data (26k drawers in our case) --------- Co-authored-by: z3tz3r0 <[email protected]> Co-authored-by: AlyciaBHZ <[email protected]> Co-authored-by: Ben Sigman <[email protected]>
3 tasks
arnoldwender
pushed a commit
to arnoldwender/mempalace
that referenced
this pull request
Apr 13, 2026
…mPalace#666) Replace "your memory system" with explicit MemPalace references and tool names (mempalace_diary_write, mempalace_add_drawer, mempalace_kg_add) in stop and precompact hook block reasons. This prevents Claude Code from misinterpreting the hook as a native auto-memory save instruction. Updated in both Python (hooks_cli.py) and standalone shell scripts. Also fix CONTRIBUTING.md Getting Started to show the fork-first workflow, matching the PR Guidelines section.
jphein
added a commit
to jphein/mempalace
that referenced
this pull request
Apr 13, 2026
…uto-memory Block reasons now: - Name "(MemPalace)" explicitly to avoid confusion with auto-memory - Add mempalace_kg_add as optional step 3 - Explicitly say "Do NOT write to Claude Code's native auto-memory (.md files)" Addresses the same root cause as MemPalace#666: Claude's auto-memory system prompt can dominate generic "save to your memory system" instructions. Co-Authored-By: Claude Opus 4.6 <[email protected]>
sha2fiddy
pushed a commit
to sha2fiddy/mempalace
that referenced
this pull request
Apr 13, 2026
* fix: disambiguate hook block reasons to name MemPalace explicitly (MemPalace#666) Replace "your memory system" with explicit MemPalace references and tool names (mempalace_diary_write, mempalace_add_drawer, mempalace_kg_add) in stop and precompact hook block reasons. This prevents Claude Code from misinterpreting the hook as a native auto-memory save instruction. Updated in both Python (hooks_cli.py) and standalone shell scripts. Also fix CONTRIBUTING.md Getting Started to show the fork-first workflow, matching the PR Guidelines section. * fix: remove chromadb <0.7 upper bound — blocks 1.x installs The current constraint `chromadb>=0.5.0,<0.7` forces pip to install chromadb 0.6.x, but palaces created with chromadb 1.x (which is what the mempalace dev environment actually uses — 1.5.7 per uv.lock) have an incompatible SQLite schema. Specifically, chromadb 0.6.x fails with `KeyError: '_type'` when opening a collection written by 1.x. This means a fresh `pip install mempalace` gives users a chromadb version that cannot read palaces created in the maintainer's own environment. The fix removes the upper bound so pip can resolve to the current stable chromadb release. Reproduction: python3 -m venv .venv && source .venv/bin/activate pip install mempalace # installs chromadb 0.6.3 # Try opening a palace created with chromadb 1.x: # -> _get_collection() returns None, tool_status() returns "No palace found" pip install chromadb==1.5.7 # force upgrade # -> tool_status() returns real data (26k drawers in our case) --------- Co-authored-by: z3tz3r0 <[email protected]> Co-authored-by: AlyciaBHZ <[email protected]> Co-authored-by: Ben Sigman <[email protected]>
sha2fiddy
pushed a commit
to sha2fiddy/mempalace
that referenced
this pull request
Apr 14, 2026
* fix: disambiguate hook block reasons to name MemPalace explicitly (MemPalace#666) Replace "your memory system" with explicit MemPalace references and tool names (mempalace_diary_write, mempalace_add_drawer, mempalace_kg_add) in stop and precompact hook block reasons. This prevents Claude Code from misinterpreting the hook as a native auto-memory save instruction. Updated in both Python (hooks_cli.py) and standalone shell scripts. Also fix CONTRIBUTING.md Getting Started to show the fork-first workflow, matching the PR Guidelines section. * fix: remove chromadb <0.7 upper bound — blocks 1.x installs The current constraint `chromadb>=0.5.0,<0.7` forces pip to install chromadb 0.6.x, but palaces created with chromadb 1.x (which is what the mempalace dev environment actually uses — 1.5.7 per uv.lock) have an incompatible SQLite schema. Specifically, chromadb 0.6.x fails with `KeyError: '_type'` when opening a collection written by 1.x. This means a fresh `pip install mempalace` gives users a chromadb version that cannot read palaces created in the maintainer's own environment. The fix removes the upper bound so pip can resolve to the current stable chromadb release. Reproduction: python3 -m venv .venv && source .venv/bin/activate pip install mempalace # installs chromadb 0.6.3 # Try opening a palace created with chromadb 1.x: # -> _get_collection() returns None, tool_status() returns "No palace found" pip install chromadb==1.5.7 # force upgrade # -> tool_status() returns real data (26k drawers in our case) --------- Co-authored-by: z3tz3r0 <[email protected]> Co-authored-by: AlyciaBHZ <[email protected]> Co-authored-by: Ben Sigman <[email protected]>
sha2fiddy
pushed a commit
to sha2fiddy/mempalace
that referenced
this pull request
Apr 14, 2026
…mPalace#666) Replace "your memory system" with explicit MemPalace references and tool names (mempalace_diary_write, mempalace_add_drawer, mempalace_kg_add) in stop and precompact hook block reasons. This prevents Claude Code from misinterpreting the hook as a native auto-memory save instruction. Updated in both Python (hooks_cli.py) and standalone shell scripts. Also fix CONTRIBUTING.md Getting Started to show the fork-first workflow, matching the PR Guidelines section.
igorls
added a commit
that referenced
this pull request
Apr 14, 2026
Main had 9 commits that never back-merged into develop after the v3.2.0 release cycle. Resolving conflicts as follows: - mempalace/version.py: keep develop (3.3.0 release target) - README.md: keep develop (Milla's #835 audit is authoritative — main had stale 19 tools / 170 tokens / "30x lossless" / v3.0.0 label) - hooks/mempal_{save,precompact}_hook.sh: keep develop (#786 reversed the #666 "decision=block" behavior intentionally to stop hooks from making agents write in chat) - pyproject.toml: auto-merged — keeps develop's 3.3.0 and picks up main's chromadb upper-bound removal (#690) - CONTRIBUTING.md, mempalace/hooks_cli.py: auto-merged cleanly — picks up main's improvements (fork-first clone, more detailed block reason strings that name MemPalace and specific tools) - integrations/openclaw/SKILL.md: bumped 3.2.0 → 3.3.0 (version tracks the package per #761 convention) - CHANGELOG.md: manual merge — kept develop's preamble + Unreleased v3.3.0 section + footer links; folded main's richer v3.2.0 entries (Packaging section for #690/#761; Bug Fixes #685/#677/#716/#707/ #755/#757; Documentation #734/#733) into the v3.2.0 section; deduped the split Documentation sections that auto-merge produced
This was referenced Apr 14, 2026
Merged
igorls
added a commit
that referenced
this pull request
Apr 14, 2026
Bring back the main-only content that develop has been missing: - pyproject.toml chromadb upper-bound removal (#690) - CHANGELOG [3.2.0] Packaging subsection (#690, #761) - CONTRIBUTING.md fork-first clone instructions - mempalace/hooks_cli.py richer block-reason strings (from #666, still used by the Python hook invocation path) - integrations/openclaw/SKILL.md version bump to 3.3.0 Plus the v3.3.0 release commit itself (4aa7e1e) and the legacy main-only commits (#666, #690, v3.2.0 finalization) for history. Resolves the main → develop drift that caused PR #838's conflicts. Going forward, back-merging main to develop after each release will prevent the same pattern. Single conflict in CHANGELOG.md resolved by taking main's version (the Packaging subsection under [3.2.0]).
3 tasks
sha2fiddy
pushed a commit
to sha2fiddy/mempalace
that referenced
this pull request
Apr 14, 2026
…mPalace#666) Replace "your memory system" with explicit MemPalace references and tool names (mempalace_diary_write, mempalace_add_drawer, mempalace_kg_add) in stop and precompact hook block reasons. This prevents Claude Code from misinterpreting the hook as a native auto-memory save instruction. Updated in both Python (hooks_cli.py) and standalone shell scripts. Also fix CONTRIBUTING.md Getting Started to show the fork-first workflow, matching the PR Guidelines section.
jphein
added a commit
to jphein/mempalace
that referenced
this pull request
Apr 16, 2026
…uto-memory Block reasons now: - Name "(MemPalace)" explicitly to avoid confusion with auto-memory - Add mempalace_kg_add as optional step 3 - Explicitly say "Do NOT write to Claude Code's native auto-memory (.md files)" Addresses the same root cause as MemPalace#666: Claude's auto-memory system prompt can dominate generic "save to your memory system" instructions. Co-Authored-By: Claude Opus 4.6 <[email protected]>
jphein
added a commit
to jphein/mempalace
that referenced
this pull request
Apr 19, 2026
…uto-memory Block reasons now: - Name "(MemPalace)" explicitly to avoid confusion with auto-memory - Add mempalace_kg_add as optional step 3 - Explicitly say "Do NOT write to Claude Code's native auto-memory (.md files)" Addresses the same root cause as MemPalace#666: Claude's auto-memory system prompt can dominate generic "save to your memory system" instructions. Co-Authored-By: Claude Opus 4.6 <[email protected]>
jphein
added a commit
to jphein/mempalace
that referenced
this pull request
Apr 19, 2026
…uto-memory Block reasons now: - Name "(MemPalace)" explicitly to avoid confusion with auto-memory - Add mempalace_kg_add as optional step 3 - Explicitly say "Do NOT write to Claude Code's native auto-memory (.md files)" Addresses the same root cause as MemPalace#666: Claude's auto-memory system prompt can dominate generic "save to your memory system" instructions. Co-Authored-By: Claude Opus 4.6 <[email protected]>
sha2fiddy
pushed a commit
to sha2fiddy/mempalace
that referenced
this pull request
Apr 20, 2026
…mPalace#666) Replace "your memory system" with explicit MemPalace references and tool names (mempalace_diary_write, mempalace_add_drawer, mempalace_kg_add) in stop and precompact hook block reasons. This prevents Claude Code from misinterpreting the hook as a native auto-memory save instruction. Updated in both Python (hooks_cli.py) and standalone shell scripts. Also fix CONTRIBUTING.md Getting Started to show the fork-first workflow, matching the PR Guidelines section.
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
.mdfiles). The always-loaded# auto memoryinstructions dominate interpretation, so Claude writes markdown files instead of calling MemPalace MCP tools. Result: hooks fire correctly but zero palace drawers are created.hooks_cli.py: rewriteSTOP_BLOCK_REASONandPRECOMPACT_BLOCK_REASONto name MemPalace explicitly, list the exact MCP tools (mempalace_diary_write,mempalace_add_drawer,mempalace_kg_add), and instruct not to use native auto-memory.hooks/mempal_save_hook.sh,hooks/mempal_precompact_hook.sh: update matching hardcoded reason JSON strings.CONTRIBUTING.md: Getting Started now shows the fork-first workflow, matching the PR Guidelines section.Test plan
pytest tests/ -v— 589 passed, 0 failedgrep -r "your memory system" mempalace/ hooks/— zero matches