Skip to content
← Blog

Case study

We repeated Mem0’s “97% smaller” Claude Code test

2026-11-17 · Alexein

Mem0 published a test of their Claude Code plugin: “How Mem0 cut Claude Code’s memory footprint by 97%”. Without memory, Claude Code loads the repo’s memory files into every session, 13,700 tokens in their test. With their plugin, those files are gone, and a 445-token slice of memory is pulled in on demand.

A claim like that is easy to make and hard to check, so we checked it. We ran the same test with Alexein in Mem0’s place, three times for each setup and task instead of once, and we counted our own overhead too.

  • 98%

    less memory in Claude’s context

    on the analysis task, counted Mem0’s way; 75% on test writing. Mem0 reported 97%

  • 89%

    less, counting all our own overhead

    on the analysis task, our instructions and tool definitions included; 43% on test writing

  • 6 of 6

    test-writing runs passing every test

    3 with Alexein, 3 without

  • 3 of 3

    kept a preference on a fresh checkout

    0 of 3 for Claude Code without memory

The setting

The same repo. mem0ai/mem0 at the last commit before Mem0’s post. Its CLAUDE.md, 12,400 tokens of how the project is built and tested, is what Claude Code loads into every session without memory.

Two setups.

  • Without memory: Claude Code with the repo’s CLAUDE.md, loaded whole every session.
  • With Alexein: the memory files deleted, and the same text added to Alexein as 13 documents, one per section, plus our Claude Code plugin. Before the test, three ordinary sessions in this setup gave memory “earlier sessions”, as Mem0’s test had.

Kept the same: Claude Code 2.1.325 with Claude Opus 5.5, the same prompts and tool permissions, every run from a clean copy of the repo, and Claude Code’s own auto memory turned off in both, so nothing else could carry memory across. Alexein ran as a local copy on one machine. Each task ran 3 times per setup, alternating setups.

Two ways to count. Mem0 counted memory files plus memories fetched into the context. We report that, and a strict count that adds everything our plugin puts in the context: its instructions, our MCP server’s instructions and any memory tool definitions Claude loads. Mem0’s post does not count these for itself. We do, so our overhead is in plain sight.

Experiment 1: two real tasks

Analysis: “Analyse this repository: what it is, how it is organised, and where test coverage is thin across both SDKs. List the biggest gaps.” Test writing: a full unit test suite for the TypeScript SDK’s Qdrant backend, with a mocked client, run until it passes.

Experiment 1median of 3 runs
Analysis, withoutAnalysis, AlexeinTests, withoutTests, Alexein
Memory in context, Mem0’s way12,400301 (−98%)12,4003,056 (−75%)
Memory in context, strict12,4001,339 (−89%)12,4007,094 (−43%)
Tests written, all passing––82, 108, 92109, 78, 80
Tokens. Mem0 reported 13,700 → 445 for memory in context, from one session per setup.
  • The footprint result holds. The 12,400-token file is gone from every session, in every run. Counted Mem0’s way we land where they did: 98% against their 97%.
  • On analysis, Claude didn’t need memory. It read the code and did the job.
  • On test writing, it used memory as intended. It searched first, for the SDK’s testing conventions, and saved a note of what it built afterwards. That search, and loading the save tool, is why its footprint is higher.
  • Quality held: every test-writing run, in both setups, passed all its own tests when we ran them.

Experiment 2: does a preference survive /clear?

Session one asks for a small Python helper, then states a preference. The session ends. A new, empty session asks for a second helper. Does it follow the preference without being told again?

Mem0’s preference, “standard for loops over list comprehensions”, couldn’t tell the setups apart: Claude writes for loops for these helpers anyway. So we used one nobody follows by habit: “I prefer while loops over for loops and list comprehensions.” We ran it two ways: realistic, where the repo keeps what session one did, and strict, where the repo is reset first, as on a fresh checkout or another machine.

Experiment 2followed, of 3 runs
Without memoryAlexein
Realistic: the repo keeps session one’s work2 of 33 of 3
Strict: a fresh checkout0 of 33 of 3
Without memory, both recalls came from a CLAUDE.local.md that Claude Code wrote into the repo by itself. Alexein’s recalls came from memory; its runs are from a rerun after your own notes began to count at once.

Without memory, a preference survives only if Claude happens to write it into a file in the repo. On a fresh checkout, another branch or another machine, that file isn’t there, and nothing was remembered. With Alexein, the new session’s memory search brought the preference back, with no file involved.

What we changed because of it

  • Your own notes count at once: a preference you save is treated as a known preference straight away, not a little later.
  • Leaner search answers for agents: 26–29% smaller, with nothing lost across 1,891 benchmark questions.
  • A smaller save tool: its definition went from 4,944 to 2,104 characters, which Claude Code loads the moment it saves anything.

Limits

  • A newer Claude Code than Mem0 likely used (2.1.325 against 2.1.209), and the repo’s CLAUDE.md only (12,400 tokens, against their 13,700, which probably included their own files).
  • Runs were headless, so we reproduced /clear by ending the session and starting a new one in the same folder.

Try it

Connect Alexein to Claude Code from the MCP page, or move from Mem0 with the migration guide. For what memory does beyond a smaller footprint, read our test of Claude Code on team knowledge.