Search past Claude Code sessions and Obsidian notes to recover decisions, debugging insights, and context. Use when asked to recall, find, or search past sessions/notes, or when user says "recall". Triggers on "recall", "past session", "did I", "how did I", "find the session where".
Search indexed Claude Code and Codex CLI sessions (local and remote machines) and Obsidian research notes.
Sessions are organized by agent and host under ~/.recall/.
| Directory | Content |
|---|---|
claude-code-local/ | Claude Code sessions — this machine |
claude-code-<host>/ | Claude Code sessions — remote machine |
codex-local/ | Codex CLI sessions — this machine |
codex-<host>/ | Codex CLI sessions — remote machine |
obsidian-<vault>/ | Obsidian research notes (optional) |
Each machine gets one Claude Code directory and one Codex directory. QMD collection names are user-defined when running qmd collection add — always check qmd collection list for the actual names to pass to -c. Omit -c to search all collections at once.
QMD provides three search commands. Pick the right one for the query:
| Command | Type | Best for | Example |
|---|---|---|---|
qmd query | Hybrid (BM25 + semantic) | General queries, best overall ranking — use for ~80% of searches | "gradient accumulation", "QMD video project status" |
qmd search | BM25 (keyword) | Exact strings, known identifiers, error messages | "tmux prefix", "CUDA error", "FileNotFoundError" |
qmd vsearch | Semantic (embeddings) | Conceptual/fuzzy queries where exact words won't appear in the text | "times I was stuck on a bug", "ideas I never followed up on" |
# BM25 — fast, deterministic, best for known keywords
qmd search "<query>" -n 5
qmd search "<query>" -c local -n 5
# Semantic — finds meaning even without exact word matches
qmd vsearch "<query>" -n 5
qmd vsearch "<query>" -c vault -n 5
# Hybrid — combines both, best ranking
qmd query "<query>" -n 5
qmd query "<query>" -c <collection> -n 5
Multi-query expansion: For vague or conceptual queries, expand into 2-3 related searches with different phrasings and merge results. Increase -n beyond 5 (up to 15) for broad recall. Example — user asks "when was I happy":
qmd vsearch "happy, grateful, excited" -c vault -n 10
qmd vsearch "energy, great day, feeling good" -c vault -n 10
qmd vsearch "satisfaction, accomplishment, shipped" -c vault -n 10
For BM25 synonym expansion (exact keywords with variation):
qmd search "CUDA error" -n 10
qmd search "GPU out of memory" -n 10
qmd search "RuntimeError device" -n 10
For hybrid broad recall:
qmd query "debugging training failures" -n 15
Merge and deduplicate before synthesizing.
For date-based queries (recall yesterday, recall what did I do on Feb 20):
find ~/.recall/claude-code-* -name "YYYY-MM-DD-*.md" | sort
## 2026-02-20 — 36 sessions
| Time | Machine | Project | Msgs | Files | Slug | Summary |
|------|---------|---------|------|-------|------|---------|
| 09:15–09:45 | local | dotfiles | 8 | 3 | tmux-setup | Set up tmux config |
| 10:00–11:30 | remote | my-project | 24 | 7 | grad-accum-fix | Fixed gradient accumulation bug |
| ... | | | | | | |
Search within a specific project:
qmd search "<query>" -c local --path "claude-code-local/<project>/" -n 5
To list projects per machine:
ls ~/.recall/claude-code-local/
# ls ~/.recall/claude-code-<host>/ # additional machines if configured
Find sessions that touched a specific file:
grep -rl "filename.py" ~/.recall/claude-code-*/ | head -10
bash sync_remotes.sh # run from the skill directory
grep -rli "<query>" ~/.recall/claude-code-*/ ~/.recall/codex-*/ ~/.recall/obsidian-*/ | head -10