Documentation
Browse documentation

Using memory

Long sessions

When Claude Code shortens a long conversation to make room, it keeps only a short summary. Endless Mode gives it a full session record to read, so it continues from where it was instead of from that summary.

What happens

  1. Claude Code compacts the conversation.
  2. At the next session start, MemIndex writes a record of the session as a Markdown file in your data folder, under bottles.
  3. MemIndex tells Claude Code to read that file first and continue from where it ends. The usual list of recent notes is left out, because the record already covers it.

The record has your messages and Claude's text replies, word for word, with one line for each note about what happened between them. It starts with your original request, and each turn has its time.

If the original conversation is gone, MemIndex rebuilds the record from your saved prompts, notes and summaries. It says so at the top of the file and does not recreate replies it no longer has. A long record is read from its end first.

Private tags apply: a message you wrapped in <private> appears as "a private message — not recorded", and so does its reply.

When it applies

Endless Mode runs in Claude Code with the local setup, and it is on by default. A conversation you resume that was never compacted gets nothing, because Claude Code already restores it in full. To turn it off, set MEMINDEX_ENDLESS_MODE_ENABLED to false in your settings. MemIndex then adds the usual list of recent notes after a compaction instead.

Files are readable only by you. When you run /clear, the old session's record moves to an archive folder next to it, and nothing is deleted.

Check it

After a long session compacts, the new context starts with a heading that reads Endless Mode — session continuation. Claude Code reads the record file named under it. If it does not appear, check that the service is running with npx memindex status, and that the setting above is not false.

Next steps