Bring memory in and take it out
Ingest your agent's memory files
Some agents keep their own memory as small Markdown files. MemIndex can pull those files in as notes, so they are searchable with everything else. No model writes them, so it costs nothing.
One-time import
Claude Code keeps a memory folder for each project. Preview what would come in, then run it:
npx memindex memory ingest --dry-run
npx memindex memory ingest
Memory dry-run (no Haiku, mechanical store) — source: ~/.claude/projects/-…-proj/memory
Mode: single
proj (cwd UNRESOLVED): 2 files → 2 obs, 0.3 KB, index skipped
TOTAL: 1 memory dirs → 2 files = ~2 observations (0.3 KB prose)
WARNING: 1 dir(s) had no sibling transcript to resolve cwd — project key is a best-effort guess and may not merge with live capture.
NOTE: mechanical store — memory prose is stored as-is, no model spend. Dedup by content_hash.
proj/deploy.md: stored -> obs #5
proj/style.md: stored -> obs #6
MEMORY INGEST: 2 stored, 0 already-imported, 0 skipped, 0 failed, of 2 files across 1 dirs (1 orphaned/cwd-unresolved)
Run it again whenever you like. Files already stored are reported as already imported:
MEMORY INGEST: 0 stored, 2 already-imported, 0 skipped, 0 failed, of 2 files across 1 dirs (1 orphaned/cwd-unresolved)
- With no option, it imports the memory folder of the project you are in.
--allimports every project's folder, and--source <folder>names one.--require-cwdskips folders whose project folder it cannot work out. - Each file becomes one note. Its title is the file's
name, else its first heading, else its file name.MEMORY.md, links and files over 64 KB are skipped. - A folder with no matching conversation record is flagged, as above, because the project name is a best guess and may not line up with notes recorded live.
Keep a folder in sync
MEMINDEX_MEMORY_WATCH_ROOTS turns a folder into a watched source. It is empty by default, so nothing is watched until you add up to eight entries to your settings:
{
"MEMINDEX_MEMORY_WATCH_ROOTS": "[{\"path\": \"~/notes/memory\", \"project\": \"shop\"}]"
}
MemIndex saves each new or changed .md file, up to 64 KB and 500 files per folder, and never changes your files. The same content is saved only once.