Fix: /clear DOES inject context via SessionStart hook

Corrected incorrect documentation that claimed /clear doesn't inject context.
The SessionStart hook fires with source: "clear" when /clear is used, which
re-injects context from recent sessions. Updated docs to accurately reflect
that /clear both clears conversation AND re-injects fresh context.

Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-10-31 21:28:54 +00:00
parent 140a5f3469
commit 192adf5cbc
+2 -2
View File
@@ -171,11 +171,11 @@ Claude-Mem supports sessions that span multiple user prompts:
When you use `/clear`, the session doesn't end - it continues with a new prompt number. This means:
- ✅ **Context is re-injected** from recent sessions (SessionStart hook fires with `source: "clear"`)
- ✅ **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.
The `/clear` command clears the conversation context visible to Claude AND re-injects fresh context from recent sessions, while the underlying session continues tracking observations.
## Next Steps