← Back to home

Claude Code Memory Management—The 200-Line Ceiling and Memory Rot

Long-Form Video · EP0020 May 26, 2026 4:09
What this episode covers

Claude Code's memory index file, MEMORY.md, has a 200-line ceiling, and everything past it gets cut off outright.

My own WeChat Channels project has an index up to 345 lines, which means 145 lines of memory get dropped every time it opens. There are 30-plus projects on this machine, and if all that memory piles up in one place—thousands of lines—Claude Code only ever sees the first 200.

Worse, memory rots: overflow (never read), contamination (memory bleeding between projects), staleness (old memory overriding a new situation). The fix is to isolate projects with folders, so each one gets its own 200 lines of memory space.

Claude Code’s memory system needs no plugins; the native one is enough. But it has a limit most people don’t know about—the memory index MEMORY.md has a 200-line ceiling, and it can’t read anything past that.

The 200-line ceiling

My own WeChat Channels project has an index that’s grown to 345 lines, which means 145 lines of memory get cut off every time it opens. And that’s one project—there are 30-plus on this machine. Pile every project’s memory into one place, thousands of lines, and Claude Code sees the first 200 while the rest might as well never have been written.

Three ways memory rots

The problem isn’t just that it can’t hold everything. Worse, memory rots.

Overflow—past 200 lines it gets cut. Whatever you stored later may never be read at all.

Contamination—memory from different projects runs together. Your WeChat Channels experience gets applied to your client project. Your client project’s config ends up in the WeChat Channels memory. It isn’t doing this on purpose; it just can’t tell which project a given memory belongs to.

Staleness—you stored a memory three months ago, the situation has changed since, and the old memory is still sitting there. Claude Code reads it, acts on the old version, and things break.

The more memory and the more projects, the faster the rot.

The fix: folder isolation

Use folders to isolate projects. Claude Code knows which project you’re in from one thing only: which folder you opened it in. Open it in the WeChat Channels folder and it reads WeChat Channels memory alone. Open it in the blog folder and it reads blog memory alone. Each project’s 200 lines are counted independently—no crowding, no contamination.

You don’t have to type commands to create a project. Open Claude Code in your home directory and just say “set up a new project for me.” Claude creates CLAUDE.md, settings.json, all of it.

The three-piece project entry

A complete project that Claude Code sets up for you contains:

  1. The project folder—from here on, working on this project means going into this folder and opening Claude Code
  2. CLAUDE.md—the project manual: what the project is for, what the directory looks like, what the conventions are. The first thing it does in every new conversation is read this file
  3. The .claude folder—the config center, holding settings.json (permissions and command config) and settings.local.json (keys, not committed to Git)

Rules vs memory

One important distinction: rules are global, memory is isolated per project.

Rules live in the .claude folder in your home directory and load automatically no matter which project you open—coding style, commit conventions, how we work together, all of it obeyed across every project.

But memory travels with the project. Each project has its own memory space under projects inside the .claude folder. My WeChat Channels project, for instance, has 73 memory files—how covers get made, what flow subtitles follow, the standard steps of the production line, one thing per file.

MEMORY.md is the index to that memory, like a book’s table of contents. At the start of every new conversation Claude Code reads the index, then reads the memories that match what you’re doing. The 200-line ceiling is counted per project. Thirty projects means 30 independent sets of 200 lines.

This isn’t about tidiness for its own sake—it’s so projects stop crowding each other’s memory out.

This isn't about tidiness for its own sake—it's so projects stop crowding each other's memory out.