Skip to content
NewMinniCode is out now, in Experimental Beta.Get MinniCode→
Minni AI
DemoEvidenceService
Products
Products
  • MinniMemoryMCPFlagship, early accessMemory for your AI agentSplits your agent’s memory into a small always-on part and files that load only when a task needs them.
  • MinniCodeExperimental BetaOpen-LLM optimized, low token coding agentA low token terminal coding agent, optimized for open LLMs. Reads, edits, tests and opens pull requests.
  • MinniTunerExperimental Beta, WindowsHardware optimization agentTunes how your PC uses its CPU, GPU and RAM. One plan you approve, every change undoable.
DocsMinniMemoryMCP docsInstall it, the commands, undoMinniCode docsInstall it, pick a model, the commandsMinniTuner docsThe tiers, Ask Minni, what is sent
See it workDemoThe full tour in one videoHow it worksEach product, step by step
Resources
LearnGuidesFAQnpm package
CompanyContactSupportPrivacyTermsData handlingSecurity

Guides

How Claude Code remembers across sessions

Every Claude Code session starts with an empty context window; the conversation itself does not carry over. Two things do: the CLAUDE.md files you write (with the files they import) and auto memory, the notes Claude writes for itself in a folder per repository. Both load at the start of every session, so the more they hold, the more every turn costs.

Updated 2026-11-16

What carries over and what does not#

Carries over?Who writes itWhen it loads
The conversationNo. A new session starts empty. /resume reopens an old one, which is a different thing from memory.You and ClaudeOnly while the session runs
CLAUDE.md filesYesYouAt launch, every session
Files a CLAUDE.md imports with @pathYesYouAt launch, with the file that imports them
.claude/rules/*.mdYesYouAt launch; a rule with a paths field loads when Claude touches a matching file
Auto memoryYesClaudeAt launch: the start of MEMORY.md; topic files when Claude opens them
A CLAUDE.md in a subfolderYesYouOn demand, once Claude works in that subfolder

Source: Anthropic’s memory docs. Claude treats all of it as context, not as enforced rules: an instruction it must never skip belongs in a hook, not a memory file.

CLAUDE.md: the memory you write#

CLAUDE.md files load in a fixed order, broadest first, so a project instruction lands after a user instruction:

  • Managed policy, set by an organization: /Library/Application Support/ClaudeCode/CLAUDE.md on macOS, /etc/claude-code/CLAUDE.md on Linux, C:\Program Files\ClaudeCode\CLAUDE.md on Windows.
  • Your user file, ~/.claude/CLAUDE.md: loads in every project.
  • The project file, ./CLAUDE.md or ./.claude/CLAUDE.md, shared through git. A repository can use AGENTS.md in its place.
  • ./CLAUDE.local.md: your own notes for one project, kept out of git.

A line like @docs/testing.md imports that file at launch, and an imported file can import more, up to four hops deep. An import is never on demand: it loads every session, with the file that names it. A path in backticks stays text and is not imported.

To see what loaded, run /context all and read the list under Memory files. /memory opens the files for editing.

Auto memory: the memory Claude writes#

As it works, Claude saves notes for itself: your role and preferences, corrections you gave it, project decisions it cannot read from the code, and pointers to things outside the repo. It skips what the code already says and what your CLAUDE.md already covers.

The notes live in one folder per repository, ~/.claude/projects/<project>/memory/, with MEMORY.md as the index and one topic file per note. All worktrees and subfolders of a repository share that folder; it is machine-local and never shared across machines. The start of MEMORY.md loads in every session; the topic files are read when a task needs them.

Auto memory is on by default in a local session. /memory has a toggle, which writes autoMemoryEnabled to ~/.claude/settings.json; a project can set it to false in its own settings, and CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 turns it off everywhere. autoMemoryDirectory in settings moves the folder.

The paths, with what MinniMemoryMCP adds beside them, are listed in Where Claude Code keeps its memory.

Why memory that carries over costs tokens#

Everything in the first two rows of the table above is sent with every turn, not once per session: each turn re-sends the whole conversation, and the memory files are at the front of it. A CLAUDE.md that grew from twenty lines to four hundred, plus three imported files, is paid for on every turn of every session, whether or not the task touches it.

The fix is the same one Anthropic’s own docs describe for large projects: keep in the always-loaded part only what every turn needs, and move the rest to files that load on demand. MinniMemoryMCP makes that split and keeps it current: a small AlwaysOnMemory part plus OnDemandMemory files, every line kept, undo to go back.

install it for Claude Code
$ npm i -g minnimemory
$ minnimemory install

With MinniMemoryMCP 1.6.0 on our test memory, the agent went looking in its memory 17 times instead of 89 over the same 87 answers, and the run used 47.2% fewer tokens.

How the split is made, by hand or with the tool, is in Claude Code memory: CLAUDE.md vs MinniMemoryMCP. What a session costs turn by turn is in Why Claude Code sessions get expensive.

Try MinniMemoryMCP

Free, runs on your computer, and every change can be undone. Two commands install it for Claude Code; the docs cover Codex and the rest.

install it for Claude Code
$ npm i -g minnimemory
$ minnimemory install

More guides

  • How to reduce Claude Code token usage

    Where the tokens go each turn, and eight ways to spend fewer.

    Updated 2026-11-16 · Minni AI

  • Claude Code usage limit reached: what to do, and how to hit it less

    What each limit message means, what to do now, and how to send less every turn.

    Updated 2026-11-16 · Minni AI

  • CLAUDE.md too long: what Claude Code does with it, and how to split it

    What a long CLAUDE.md costs, the real size limits, and four ways to cut it.

    Updated 2026-11-16 · Minni AI

  • Claude Code context window keeps filling up: why it compacts, and what to do

    What fills the window, what compaction keeps, and how to compact less often.

    Updated 2026-11-16 · Minni AI

  • How to reduce Codex token usage

    Where Codex spends tokens, and seven ways to spend fewer.

    Updated 2026-11-16 · Minni AI

  • Codex usage limits: why they drain and how to use fewer tokens

    How the windows work, how to check what is left, and what uses the allowance up.

    Updated 2026-11-11 · Minni AI

  • AGENTS.md too large: what Codex cuts off and how to split it

    The 32 KiB cap, how to see which files load, and five ways back under it.

    Updated 2026-11-11 · Minni AI

  • How to lower a Claude Code or Codex API bill

    What a coding agent bills on an API key, and the levers that move it.

    Updated 2026-11-16 · Minni AI

  • Why Claude Code sessions get expensive

    Every turn re-sends the whole session. What makes that grow.

    Updated 2026-11-05 · Minni AI

  • Claude Code memory: CLAUDE.md vs MinniMemoryMCP

    What belongs in CLAUDE.md, and splitting the rest out by hand or with a tool.

    Updated 2026-11-16 · Minni AI

  • MinniMemoryMCP vs Mem0, Zep, supermemory and Letta

    Four tools add memory to an agent. MinniMemoryMCP cuts what the agent already loads. When each fits.

    Updated 2026-11-16 · Minni AI

  • Where Claude Code keeps its memory

    Every memory path on your machine, what each file is for, and which ones load every turn.

    Updated 2026-11-07 · Minni AI

  • How to run a coding agent on free, open models

    What a free key gets you, what a local model can do, and where the tokens go.

    Updated 2026-10-25 · Minni AI

  • Get a free NVIDIA API key for a coding agent

    Where the key comes from, where to keep it, and how to run a coding agent on it.

    Updated 2026-11-07 · Minni AI

  • What a Windows PC optimization agent should and should not touch

    The settings worth changing, the ones that are placebo, and the ones that break things.

    Updated 2026-10-25 · Minni AI

GuidesMinniMemoryMCPHome
© 2026 Minni AI. All rights reserved.