From 192adf5cbc08a033c65c34c9508db9a44364dec6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 31 Oct 2025 21:28:54 +0000 Subject: [PATCH] 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> --- docs/usage/getting-started.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/usage/getting-started.mdx b/docs/usage/getting-started.mdx index d2c2ae3a..20b516ea 100644 --- a/docs/usage/getting-started.mdx +++ b/docs/usage/getting-started.mdx @@ -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