How to search earlier sessions
This guide shows how to find something said in an earlier conversation of a project: by hand with /memory, or by letting the model search with its search_memory tool. It assumes sessions are kept (see Keep sessions and resume them).
Search by hand
-
Turn the command on in the agent's YAML:
sessions: enabled: true searchMemory: true -
Start mm — the terminal, the window (
mm -tui) or an editor — and type the words you remember:/memory port api🔎 2 hit(s) for "port api" in /work/project/.mm/sessions 20261010-090000-aaaaaaaa · 2026-10-10 09:30 · turn 1 · question Which port should the API server listen on? → Let's use port 8417 for the API server: 8080 is already taken by the admin UI. … -
To continue that conversation,
/resume 20261010-090000-aaaaaaaa(terminal and window).
The model is not called and the conversation in progress is not changed. A hit holds at least one of the words; the more of them it holds, the higher it comes. A question comes with the answer its turn ended on (→).
Let the model search
-
Declare the tool:
sessions: enabled: true autoSearchMemory: true -
Ask as you would a colleague who was there: "What port did we decide for the API server last time?", "Write config.go with the port we agreed on before." The model calls
search_memory, reads the hits, and answers from them.
The two keys are independent: searchMemory alone gives you the command and the model no tool; autoSearchMemory alone the reverse.
Variants
- Search in the language the sessions were held in. The search matches words, not meanings: a French question searched in French finds nothing in a session written in English. Use the words that were actually written; when the tool finds nothing, its output tells the model to try synonyms or English. A different word for the same thing — "database" for a session that said "storage" and "SQLite" — is still not found.
- Sessions in a shared directory. With an absolute
sessions.dir, the search covers every project that writes there. - Sessions are off. Either key then prints a start-up warning and does nothing.
See also
demos/memory-search/— a measured demo: an assistant that remembers a project's decisions- Configuration reference —
sessions.searchMemory,sessions.autoSearchMemory - Slash commands reference —
/memory - Tools reference —
search_memory - Why sessions work this way
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
|