← 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 — meaning 145 lines of memory get dropped every time it opens. There are 30-plus projects on this machine, and if all the 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: use folders to isolate projects, so each one has its own independent 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. If every project’s memory piles into one place, thousands of lines, Claude Code only sees the first 200 and 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. Memory you stored later may never be read at all.

Contamination — memory from different projects mixes. 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 — a memory stored three months ago, the situation has changed since, but the old memory is still there. Claude Code reads it, acts on the old version, and things go wrong.

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

The fix: folder isolation

Use folders to isolate projects. Claude Code identifies a project by nothing more than which folder you’re currently in. Open it in the WeChat Channels folder and it only reads WeChat Channels memory. Open it in the blog folder and it only reads blog memory. 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.md, settings.json, all of it gets created by Claude.

The three-piece project entry

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

  1. The project folder — from now on, to work on this project you go into this folder and open 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, 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 relevant memories based on 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.