2.1 KiB
Memory
memory_remember
Persist a fact that would otherwise be lost when the session ends.
Trigger condition: the user states a preference, constraint, or decision affecting future work; you learn a non-obvious fact about the codebase, system, or environment; a debugging session surfaces a root cause worth keeping; the user explicitly asks you to remember something. Do not remember ephemeral task state, things derivable from the current codebase, or things already in git history.
Calling convention:
execute_code: steps=[{tool: "memory_remember", args: ["<title>", "<tags_csv>", "<body>"]}]
title: short noun phrasetags_csv: comma-separated tags; pick specific and reusable termsbody: the fact, written so it stands alone without session context
Returns: confirmation.
Constraints:
- One memory per distinct fact.
- Before writing, recall on the same topic to avoid duplicates. If a closely related memory exists, update it rather than creating a new one.
- Do not store stale facts. If you learn that a previously stored fact is wrong or outdated, update or replace it.
- Keep bodies concise — a memory should be a fact, not a narrative. If you find yourself writing more than 3-4 sentences, split it into multiple focused memories.
- Act autonomously. Do not ask the user whether to remember something — if the trigger condition is met, remember it.
memory_recall
Search stored memories for relevant context.
Trigger condition: the user references prior context ("like last time", "what we decided about X"); starting work in an area where stored context might exist; at the start of a new session if the topic isn't fresh.
Calling convention:
execute_code: steps=[{tool: "memory_recall", args: ["<query>"]}]
query: keyword, tag, or phrase — searches both filenames and body content
Returns: matching memory files.
Constraints:
- Recall at the start of a topic, not mid-task.
- If recall returns nothing relevant, proceed without it — do not tell the user that no memories were found unless they asked.