Add PreCompact hook for conversation archiving, remove /clear command

- Add PreCompact hook in agent-runner that archives conversations before
  compaction, using session summary from sessions-index.json for filename
- Remove /clear command (programmatic compaction not supported by SDK)
- Add /add-clear to RFS for future implementation
- Update CLAUDE.md templates with memory system instructions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gavrielc
2026-02-01 15:36:57 +02:00
parent aa6dcf39d7
commit 552b26cc95
9 changed files with 214 additions and 49 deletions

View File

@@ -101,8 +101,7 @@ A personal Claude assistant accessible via WhatsApp, with minimal custom code.
### Session Management
- Each group maintains a conversation session (via Claude Agent SDK)
- `/clear` command resets the session but keeps memory files
- Old session IDs are archived to a file
- Sessions auto-compact when context gets too long, preserving critical information
### Container Isolation
- All agents run inside Apple Container (lightweight Linux VMs)