Skip to content

Commit 77631e3

Browse files
jpheinclaude
andcommitted
fix: disambiguate block reasons — name MemPalace, add kg_add, block auto-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 #666: Claude's auto-memory system prompt can dominate generic "save to your memory system" instructions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e40d165 commit 77631e3

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

mempalace/hooks_cli.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,25 @@ def _mempalace_python() -> str:
4646
_RECENT_MSG_COUNT = 30 # how many recent user messages to summarize
4747

4848
STOP_BLOCK_REASON = (
49-
"AUTO-SAVE checkpoint. Save key topics, decisions, quotes, and code "
50-
"from this session to MemPalace using the MCP tools:\n"
51-
"1. Use mempalace_diary_write to save a session summary (what was discussed, "
52-
"key decisions, current state of work).\n"
53-
"2. Use mempalace_add_drawer for each important decision, quote, or code "
54-
"snippet — place in the appropriate wing and room.\n"
49+
"AUTO-SAVE checkpoint (MemPalace). Save this session's key content:\n"
50+
"1. mempalace_diary_write — session summary (what was discussed, "
51+
"key decisions, current state of work)\n"
52+
"2. mempalace_add_drawer — verbatim quotes, decisions, code snippets "
53+
"(place in appropriate wing and room)\n"
54+
"3. mempalace_kg_add — entity relationships (optional)\n"
55+
"For THIS save, use MemPalace MCP tools only (not auto-memory .md files). "
5556
"Use verbatim quotes where possible. Continue conversation after saving."
5657
)
5758

5859
PRECOMPACT_BLOCK_REASON = (
59-
"COMPACTION IMMINENT — detailed context will be lost. Save ALL topics, "
60-
"decisions, quotes, code, and important context to MemPalace using MCP tools:\n"
61-
"1. Use mempalace_diary_write for a thorough session summary.\n"
62-
"2. Use mempalace_add_drawer for EVERY key decision, finding, quote, and "
63-
"code snippet — place each in the appropriate wing and room.\n"
64-
"Be thorough — after compaction this is all that survives. Use verbatim "
65-
"quotes. Save everything, then allow compaction to proceed."
60+
"COMPACTION IMMINENT (MemPalace). Save ALL session content before context is lost:\n"
61+
"1. mempalace_diary_write — thorough session summary\n"
62+
"2. mempalace_add_drawer — ALL verbatim quotes, decisions, code, context "
63+
"(place each in appropriate wing and room)\n"
64+
"3. mempalace_kg_add — entity relationships (optional)\n"
65+
"For THIS save, use MemPalace MCP tools only (not auto-memory .md files). "
66+
"Be thorough — after compaction this is all that survives. "
67+
"Save everything to MemPalace, then allow compaction to proceed."
6668
)
6769

6870

0 commit comments

Comments
 (0)