Claude Code Memory Management — The 200-Line Ceiling and Memory Rot
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:
- The project folder — from now on, to work on this project you go into this folder and open Claude Code
- 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
- 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.
Source: EP0020_audio.mp3 · ASR model gemini-2.5-pro (chunked parallel) · full text of the 4:09 original recording
[00:00] Cleaning up Claude Code’s memory system doesn’t need a plugin at all, we can just use the native system. I’ve been coughing all day, bit of an allergy, so I’m having AI speak for me and I’m translating for the AI.
[00:10] Claude Code’s memory index file has a 200-line ceiling. Anything past 200 lines, it can’t read. And my own WeChat Channels project — that index is already up to 345 lines, which means 145 lines of memory get cut off every time I open it.
[00:23] And that’s just one project. I’ve got 30-odd of them on my machine. If all the projects’ memory piles up in one place, thousands of lines, Claude Code only sees the first 200, and the rest was stored for nothing. So that’s what today is about: how to use folders to keep memory under control and stop it from rotting.
Memory Rot
[00:37] The problem isn’t only that it can’t hold it all — worse, memory rots. What does rot mean?
[00:42] First kind: overflow. Like I said, past 200 lines it gets cut. The memory you saved later may never get read.
[00:48] Second kind: contamination. Memory from different projects gets mixed together. Your WeChat Channels experience, it goes and applies to your client project. Your client project’s config ends up in the WeChat Channels memory. It’s not doing it on purpose, it just can’t tell which project a given memory belongs to.
[01:00] Third kind: staleness. A memory you saved three months ago — the situation has changed now, but that old memory is still sitting there. Claude Code reads it, goes by the old version, and things break.
[01:10] Put those three together and that’s memory rot. The more memory you have and the more projects you have, the faster it rots.
The Fix: Folder Isolation
[01:15] So how do you solve it? Very simple: use folders to isolate the projects. The way Claude Code recognizes a project is by which folder you’re currently in. Open it inside the WeChat Channels folder and it only reads WeChat Channels memory. Open it inside the blog folder and it only reads the blog memory.
[01:29] Each project’s 200 lines is counted separately — no sharing, no contamination.
[01:33] And how do I set up a project myself? I don’t go type commands. I just open Claude Code in my home directory and tell it, set up a project for me. All the CLAUDE.md, the settings.JSON, all of it is Claude building it for me. All I do is tell it what the project is called and what it’s for.
Live Demo
[01:50] Let me demo the process now. You can see — I said one sentence, and it configured everything.
[01:56] So what exactly did it create? First, a project folder. From now on, when I work on this project, I go into this folder and open Claude Code.
[02:03] Then, a CLAUDE.md. This is the project manual — what the project is for, what the directory looks like, what conventions there are, it’s all in here. Every time you open a new conversation, the first thing Claude Code does is read this file.
[02:13] Then, a .claude folder. This is the project’s config center, and inside it there’s a settings.JSON — which commands are allowed to run, which operations to intercept, it’s all configured here. There’s also a settings.local.JSON, which stores keys and doesn’t get pushed to Git.
[02:25] Put all of that together and you’ve got a project’s complete entry point.
Memory vs Rules
[02:27] Now here’s a very important distinction: memory and rules are not the same thing. Rules are global — the rules you write in the .claude folder in your home directory load automatically no matter which project you open. Like my coding style, my commit conventions, how I collaborate with AI — those go in rules, and every project follows them.
[02:43] But memory isn’t global, memory travels with the project. Each project has its own independent memory space, under projects inside the .claude folder.
[02:51] For instance my WeChat Channels project has 73 memory files in it. How to make a cover, what the subtitle workflow is, the standard production-line steps — one file per thing.
[02:58] And there’s a MEMORY.md, which is the memory index, like the table of contents in a book. Every time you open a new conversation, Claude Code reads this index first, then reads the relevant memory based on what you’re doing.
[03:09] So that 200-line ceiling is counted per project. You’ve got 30 projects, that’s 30 independent sets of 200 lines. That’s why you split by folder — not to make it look tidy, but so each project’s memory doesn’t crowd out the others.
Wrapping Up
[03:20] So you see, it’s not that Claude Code has no memory. It does, but the memory has a ceiling, it rots, it gets contaminated. Use folders to isolate the projects, let each project manage its own memory, and the problem’s solved.
[03:31] And you can also see that I said just one sentence: set up a new project for me, and this new project is for Xiaohongshu copywriting. So set up a new folder for me, with its own independent memory, and at the same time add a shortcut entry to my terminal’s JSON config, so I can quickly open Claude Code in that folder from the terminal.
[03:47] And it asks me, is this name for the project okay? And then: task complete, awaiting instructions.
[03:54] So now it’s in here, and from now on I just find Xiaohongshu copywriting in this dropdown, and I can see it, get into this project. And this project’s memory won’t get crossed with the other projects’.
[04:05] All right, see you next episode, bye-bye.