Method reference · community pattern
Memory Bank (Cline / Roo / Cursor)
The agent reads a small folder of Markdown files at the start of every task. This folder is its long-term memory. You update these files by hand.
Community pattern
Always-loaded · read every task
Supersession: manual reconciliation
Our benchmark: 6/6 (perfect maintenance)
…drops to ~5/6 under lag
What it is
Cline and Roo Code made this method popular. It uses a folder of small, separate files instead of one giant file. The agent’s memory resets after each session. So, a rule makes it read every file in the folder before each new task. Some files describe the project and rarely change. Others, like activeContext.md, track your current work. Roo also adds a decisionLog.md file, where new decisions are added to the end.
Setup
- Add a rule, like a .clinerules file or custom instruction. The rule tells the agent: “Read all memory-bank/ files at the start of every task; they are the source of truth.” This step is required.
- Ask the agent to “initialize memory bank.” It will create the basic files from your code and documents.
- Work as you normally would. When you make a big change, tell the agent to “update memory bank” or “UMB.” The agent will review all the files, rewrite activeContext.md, and add new entries to decisionLog.md.
- Periodically, you must reconcile the files. This means merging the log file back into the main project files. This keeps them from becoming outdated. You also need to re-sync the folder when you change computers or work with teammates.
Sample directory structure
your-project/
├─ .clinerules # "read memory-bank/ every task; it is the source of truth"
└─ memory-bank/
├─ projectbrief.md # what the project is (stable — drifts)
├─ productContext.md # who it's for / why (stable — drifts)
├─ systemPatterns.md # architecture, conventions (stable — drifts)
├─ activeContext.md # current focus (update often)
├─ progress.md # done / remaining (update often)
└─ decisionLog.md # append-only decisions (Roo; newest at bottom)
Here’s the trick: the rule file contains no facts about the project. It only points to the folder. This prevents a common problem where the agent reads a summary and misses the real details. The log file always has the latest information, so the other files can be slightly out of date.
Pros & cons
Strengths
- Factless pointer. The main rule file has no facts, so it can't become outdated. It won't stop the agent from reading the source files, avoiding a common failure.
- Structured slots. Separate files create clear places for information. This helps the agent make updates correctly every time.
- Append-only log. The log file creates a history of decisions in order. This makes it clear which information is the newest.
- Firm consult directive. The instruction “Read everything, every task” is simple and clear. The agent follows it reliably.
Weaknesses
- Manual updates. You have to remember to tell the agent to update the files. If you forget, its knowledge becomes outdated.
- Session-bound capture. It only knows what happens in the session. Decisions from Slack or meetings must be added by hand.
- Token tax. The agent reads the growing files for every task. Developers report using ~300k tokens after about ~5 updates.
- Silent update failures. A known bug means the agent may say it updated files but not actually save the changes.
- Workspace-bound. The memory lives in one project folder. It doesn't sync between computers, teammates, or tools like Cline and Cursor.
- Reconciliation debt. The main files become outdated compared to the log. Someone has to merge the changes manually.
Common user feedback
This feedback comes from GitHub, Cline's own documents, and other articles. (Note: One source, MemoryLake, sells a competing product, but other neutral sources confirm the issues it raises.)
- Token cost is the biggest complaint. One developer used ~300k tokens after only ~5 updates, causing high costs and delays (GitHub #2979). Cline agrees, saying “Memory Bank isn’t about minimizing tokens” and calling it “overkill” for tasks under a day (Cline on X).
- “Only updated when somebody remembers to update it.” A common problem is that the memory becomes outdated. Users say things like “forget to update them and Cline drifts,” “I forgot to update the Memory Bank last sprint” (MemoryLake).
- It can silently fail to update. A known bug causes updates to fail without warning. The agent will say it updated the files, but writes nothing to disk. One user reported: “You did not actually update the files.” (GitHub #1911).
- No team or multi-computer support. The memory is stored in your local project folder. You have to copy the folder manually between computers or teammates. Cline and Cursor do not share memory state (MemoryLake).
- The required workflow is demanding. The official guide suggests many steps. You must read every file for each task, run “update memory bank” often, and “update memory bank at ~2 million tokens and end the session” (Cline best practices).
How it did in our benchmark
We tested the agent on six facts that had been updated. The new facts were in decisionLog.md. The old facts were in the other files. The score shows how many of the six facts the agent got right.
Memory Bank
scores a perfect 6/6, tied for the best. But this only works if you update it perfectly and use a good model. Two parts of its workflow can break it. First, it becomes outdated if you forget to log a change. Second, a weaker model might read all the files but still use the old information if it fails to check the log. It is the best you can do *manually* to keep context up to date. Other automatic methods handle this better.
See the full results →