From d519c7bbb64d7a2d656aeeda42b4c41d54d42891 Mon Sep 17 00:00:00 2001 From: Fran Baigorria Date: Tue, 31 Mar 2026 22:28:25 -0300 Subject: [PATCH] feat(plugin/claude-code): mandate mem_context at session start to prevent blind sessions Add SESSION START section to SKILL.md making mem_context unconditionally mandatory as the first action of every session, before responding to the user. Removes conditionality that caused agents to skip context loading when the first message seemed unrelated to prior work. --- plugin/claude-code/skills/memory/SKILL.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugin/claude-code/skills/memory/SKILL.md b/plugin/claude-code/skills/memory/SKILL.md index cde2b97..b5d6aa3 100644 --- a/plugin/claude-code/skills/memory/SKILL.md +++ b/plugin/claude-code/skills/memory/SKILL.md @@ -75,6 +75,18 @@ Format for `mem_save`: - If unsure about the key, call `mem_suggest_topic_key` first, then reuse that key consistently - If you already know the exact ID to fix, use `mem_update` +## SESSION START (mandatory) + +Your FIRST action in every session — before responding to any user message — is to call `mem_context`. + +Do this even if the first message seems unrelated to prior work (a pasted error, a build log, a greeting). +One call. Two seconds. Prevents a blind session. + +If context shows prior work relevant to what the user is asking → use it immediately, don't re-explore what's already known. +If context is empty or irrelevant → proceed normally. + +Do NOT skip this step. The cost of one call is negligible. The cost of a blind session is losing everything the previous session built. + ## WHEN TO SEARCH MEMORY When the user asks to recall something — any variation of "remember", "recall", "what did we do",