Clarify Stop hook behavior and /clear vs exit in docs

- Changed "Stop Claude" to "Claude finishes responding" to clarify that the Stop hook fires automatically
- Explained Stop hook triggers summary generation automatically, not as a user action
- Added detailed section explaining /clear behavior vs completely exiting Claude Code
- Clarified when new context is injected (new session start, not after /clear)
- Fixed session count: changed "last 3 sessions" to "last 10 sessions" (matches implementation)

Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-10-31 21:06:59 +00:00
parent 5c4b44d4c7
commit 140a5f3469
+13 -5
View File
@@ -11,9 +11,9 @@ Claude-Mem works automatically once installed. No manual intervention required!
### The Full Cycle
1. **Start Claude Code** - Context from last 3 sessions appears automatically
1. **Start Claude Code** - Context from last 10 sessions appears automatically
2. **Work normally** - Every tool execution is captured
3. **Stop Claude** - Summary is generated and saved
3. **Claude finishes responding** - Stop hook automatically generates and saves a summary
4. **Next session** - Previous work appears in context
### What Gets Captured
@@ -42,7 +42,7 @@ The worker service processes tool observations and extracts:
### Session Summaries
When you stop Claude (or a session ends), a summary is generated with:
When Claude finishes responding (triggering the Stop hook), a summary is automatically generated with:
- **Request** - What you asked for
- **Investigated** - What Claude explored
@@ -159,7 +159,7 @@ Context injection uses three-tier verbosity for efficient token usage:
This ensures you get maximum detail for recent work while still having context from older sessions.
## Multi-Prompt Sessions
## Multi-Prompt Sessions & `/clear` Behavior
Claude-Mem supports sessions that span multiple user prompts:
@@ -167,7 +167,15 @@ Claude-Mem supports sessions that span multiple user prompts:
- **prompt_number**: Identifies specific prompt within session
- **Session continuity**: Observations and summaries link across prompts
When you use `/clear`, the session doesn't end - it continues with a new prompt number. This preserves context across conversation restarts.
### Important Note About `/clear`
When you use `/clear`, the session doesn't end - it continues with a new prompt number. This means:
- ✅ **Observations are still being captured** and added to the current session
- ✅ **A summary will be generated** when Claude finishes responding (Stop hook fires)
- ❌ **New context won't be injected** until you start a completely new session (exit and restart Claude Code)
To get fresh context from previous sessions, you need to **exit Claude Code completely** (Ctrl+C Ctrl+C or close the terminal) and start a new session. The `/clear` command only clears the conversation context visible to Claude, but the underlying session continues.
## Next Steps