What happened?
context limit was reached and was not able to compact
What did you expect?
that the hook would run and then the context would be compacted
How to reproduce:
- Fully use mempalace in a claude code session
- Do complex tasks until context is full
- Try to compact
Got this error:
⎿ Context limit reached · /compact or /clear to continue · /model opus[1m]
✻ Crunched for 2m 53s
❯ /compact
⎿ Error: Compaction blocked by PreCompact hook: [bash ${CLAUDE_PLUGIN_ROOT}/hooks/mempal-precompact-hook.sh]:
COMPACTION IMMINENT (MemPalace). Save ALL session content before context is lost:
1. mempalace_diary_write — thorough AAAK-compressed session summary
2. mempalace_add_drawer — ALL verbatim quotes, decisions, code, context
3. mempalace_kg_add — entity relationships (optional)
Be 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.
Seems like it should be possible to work around the always block part here.
Environment:
- OS: Ubuntu 24.04
- Python version: 3.1.14
What happened?
context limit was reached and was not able to compact
What did you expect?
that the hook would run and then the context would be compacted
How to reproduce:
Got this error:
Seems like it should be possible to work around the always block part here.
Environment: