chore: sync main hotfixes into release/3.2.0#763
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.
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)
fix: remove chromadb <0.7 upper bound — blocks 1.x installs
# Conflicts: # CONTRIBUTING.md
There was a problem hiding this comment.
Pull request overview
Syncs hotfixes from main into release/3.2.0 to prevent regressions in release packaging and hook guidance, ensuring the release branch contains recent fixes before the release-to-main merge.
Changes:
- Removes the
chromadb<0.7upper bound in packaging requirements. - Updates hook “block reason” text to explicitly reference MemPalace and specific MCP tools.
- Updates contributor getting-started instructions to use a fork-first workflow and adds an upstream remote.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Updates runtime dependency constraints to allow newer chromadb versions. |
mempalace/hooks_cli.py |
Revises stop/precompact block reason messaging shown to the AI during hooks. |
hooks/mempal_save_hook.sh |
Keeps shell hook messaging consistent with updated MemPalace-specific instructions. |
hooks/mempal_precompact_hook.sh |
Keeps precompact shell hook messaging consistent with updated MemPalace-specific instructions. |
CONTRIBUTING.md |
Updates contributor onboarding commands to fork-first + upstream remote workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```bash | ||
| git clone https://github.com/MemPalace/mempalace.git | ||
| # Fork the repo on GitHub first, then clone your fork | ||
| git clone https://github.com/<your-username>/mempalace.git |
There was a problem hiding this comment.
The git clone example uses <your-username> inside the URL; in a shell this is parsed as input/output redirection (</>), so copy/paste will fail. Use a placeholder without angle brackets (e.g. YOUR_USERNAME) or quote the URL so it can be pasted safely.
| git clone https://github.com/<your-username>/mempalace.git | |
| git clone https://github.com/YOUR_USERNAME/mempalace.git |
| cd mempalace | ||
| git remote add upstream https://github.com/MemPalace/mempalace.git | ||
|
|
||
| pip install -e ".[dev]" # installs with dev dependencies (pytest, build, twine) |
There was a problem hiding this comment.
The comment says pip install -e ".[dev]" installs build and twine, but those packages aren’t included in the dev extras/dependency group in pyproject.toml. Either adjust the comment to match what’s actually installed or add the missing tools to the dev dependencies.
| pip install -e ".[dev]" # installs with dev dependencies (pytest, build, twine) | |
| pip install -e ".[dev]" # installs editable package with dev dependencies |
| "AUTO-SAVE checkpoint (MemPalace). Save this session's key content:\n" | ||
| "1. mempalace_diary_write — AAAK-compressed session summary\n" | ||
| "2. mempalace_add_drawer — verbatim quotes, decisions, code snippets\n" | ||
| "3. mempalace_kg_add — entity relationships (optional)\n" | ||
| "Do NOT write to Claude Code's native auto-memory (.md files). " | ||
| "Continue conversation after saving." |
There was a problem hiding this comment.
STOP_BLOCK_REASON includes an instruction specific to Claude Code ("Do NOT write to Claude Code's native auto-memory (.md files)") but this hook runner supports multiple harnesses (including codex). Consider making this line harness-aware or phrasing it generically so it’s accurate for non–Claude Code clients too.
| "COMPACTION IMMINENT (MemPalace). Save ALL session content before context is lost:\n" | ||
| "1. mempalace_diary_write — thorough AAAK-compressed session summary\n" | ||
| "2. mempalace_add_drawer — ALL verbatim quotes, decisions, code, context\n" | ||
| "3. mempalace_kg_add — entity relationships (optional)\n" | ||
| "Be thorough \u2014 after compaction, detailed context will be lost. " | ||
| "Do NOT write to Claude Code's native auto-memory (.md files). " | ||
| "Save everything to MemPalace, then allow compaction to proceed." |
There was a problem hiding this comment.
PRECOMPACT_BLOCK_REASON includes an instruction specific to Claude Code ("Do NOT write to Claude Code's native auto-memory (.md files)") but this hook runner supports multiple harnesses (including codex). Consider making this line harness-aware or phrasing it generically so it’s accurate for non–Claude Code clients too.
| { | ||
| "decision": "block", | ||
| "reason": "AUTO-SAVE checkpoint. Save key topics, decisions, quotes, and code from this session to your memory system. Organize into appropriate categories. Use verbatim quotes where possible. Continue conversation after saving." | ||
| "reason": "AUTO-SAVE checkpoint (MemPalace). Save this session's key content:\n1. mempalace_diary_write — AAAK-compressed session summary\n2. mempalace_add_drawer — verbatim quotes, decisions, code snippets\n3. mempalace_kg_add — entity relationships (optional)\nDo NOT write to Claude Code's native auto-memory (.md files). Continue conversation after saving." |
There was a problem hiding this comment.
This hook is documented as usable with Codex CLI as well, but the block reason text contains Claude Code–specific instructions about its native auto-memory. Consider making the message client-agnostic (or conditional) so Codex users aren’t confused by instructions that don’t apply to their harness.
| "reason": "AUTO-SAVE checkpoint (MemPalace). Save this session's key content:\n1. mempalace_diary_write — AAAK-compressed session summary\n2. mempalace_add_drawer — verbatim quotes, decisions, code snippets\n3. mempalace_kg_add — entity relationships (optional)\nDo NOT write to Claude Code's native auto-memory (.md files). Continue conversation after saving." | |
| "reason": "AUTO-SAVE checkpoint (MemPalace). Save this session's key content:\n1. mempalace_diary_write — AAAK-compressed session summary\n2. mempalace_add_drawer — verbatim quotes, decisions, code snippets\n3. mempalace_kg_add — entity relationships (optional)\nDo NOT write to any client-specific native memory or sidecar files outside MemPalace tools. Continue conversation after saving." |
| { | ||
| "decision": "block", | ||
| "reason": "COMPACTION IMMINENT. Save ALL topics, decisions, quotes, code, and important context from this session to your memory system. Be thorough — after compaction, detailed context will be lost. Organize into appropriate categories. Use verbatim quotes where possible. Save everything, then allow compaction to proceed." | ||
| "reason": "COMPACTION IMMINENT (MemPalace). Save ALL session content before context is lost:\n1. mempalace_diary_write — thorough AAAK-compressed session summary\n2. mempalace_add_drawer — ALL verbatim quotes, decisions, code, context\n3. mempalace_kg_add — entity relationships (optional)\nBe thorough — after compaction, detailed context will be lost. Do NOT write to Claude Code's native auto-memory (.md files). Save everything to MemPalace, then allow compaction to proceed." |
There was a problem hiding this comment.
This hook is documented as usable with Codex CLI as well, but the block reason text contains Claude Code–specific instructions about its native auto-memory. Consider making the message client-agnostic (or conditional) so Codex users aren’t confused by instructions that don’t apply to their harness.
| "reason": "COMPACTION IMMINENT (MemPalace). Save ALL session content before context is lost:\n1. mempalace_diary_write — thorough AAAK-compressed session summary\n2. mempalace_add_drawer — ALL verbatim quotes, decisions, code, context\n3. mempalace_kg_add — entity relationships (optional)\nBe thorough — after compaction, detailed context will be lost. Do NOT write to Claude Code's native auto-memory (.md files). Save everything to MemPalace, then allow compaction to proceed." | |
| "reason": "COMPACTION IMMINENT (MemPalace). Save ALL session content before context is lost:\n1. mempalace_diary_write — thorough AAAK-compressed session summary\n2. mempalace_add_drawer — ALL verbatim quotes, decisions, code, context\n3. mempalace_kg_add — entity relationships (optional)\nBe thorough — after compaction, detailed context will be lost. Do not rely on any client-specific auto-memory or local scratch files for preservation. Save everything to MemPalace, then allow compaction to proceed." |
* 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]>
* 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]>
Summary
Merges
mainback intorelease/3.2.0to pull in two hotfixes that were merged directly tomainwhile the v3.2.0 release branch was being prepared:chromadb<0.7upper bound (install bug on chromadb 1.x palaces)Without this sync, merging #762 (release/3.2.0 → main) would revert #690 and re-introduce the install bug.
Conflicts resolved
CONTRIBUTING.md— kept main's "fork first" contributor guidance, updated upstream URL to MemPalace orgpyproject.toml— auto-merged (version 3.2.0 from release branch + unboundedchromadb>=0.5.0from main)Verification
ruff checkcleanOnce this merges, PR #762 (release/3.2.0 → main) will be mergeable.