Bring memory in and take it out
Import past chats
Start with history instead of an empty memory. MemIndex can read the chats other coding agents saved on your computer and turn them into notes, the same way it does for work happening now.
Before you start
- The chats must be on this computer: Codex CLI keeps them in
~/.codex/sessions, Gemini CLI in~/.gemini/tmp. Use--dirfor a copy somewhere else. - MemIndex installed on this computer with a note writer set up (see Who writes your notes). Writing the notes uses that writer's account, so the dry run shows the cost first.
Import
npx memindex import chats --from codex --dry-run # Codex CLI: see what would be sent, and what it would cost
npx memindex import chats --from codex
npx memindex import chats --from gemini # Gemini CLI
--from claude-code brings in Claude Code chats too. Each tool's chats are read from where it keeps them: ~/.codex/sessions for Codex CLI, ~/.gemini/tmp for Gemini CLI. --dir FOLDER points at a copy somewhere else, and --since and --until (a date and time, like 2026-10-01T00:00:00Z) limit the window.
- The dry run counts the chats, prompts, tool uses and summaries that would go to your note writer, and estimates what writing the notes costs, before anything is spent. The estimate is priced for the default writer model; for another model it gives the amount of text instead, so you can price it yourself.
- Run it again whenever you like. Chats already imported are skipped, and so is anything the tool's own MemIndex hooks already captured.
- Notes are filed under the folder each chat was run in, as if the work had just happened. A chat that does not record its folder is counted and skipped.
- Your note writer reads the chats, so their text goes to whichever provider you chose in Settings. Private tags are stripped, and the tool-skip setting applies, as for live work.
- This works with MemIndex on this machine. It does not run against MemIndex hosting.