Claude Code Forgets Everything Between Sessions. MEMORY.md Fixes That
Claude Code resets its context between sessions, causing developers to repeatedly provide the same project information. MEMORY.md solves this by acting as a persistent, lightweight index of a project's evolving state that Claude reads at startup. The file complements CLAUDE.md by tracking recent decisions and changes, reducing redundant explanations and improving productivity.
- ▪Claude Code starts each session with a fresh context window, losing information from previous sessions unless explicitly saved.
- ▪MEMORY.md is a 200-line project index file that stores evolving state, such as recent migrations and active work, for Claude to reference at session start.
- ▪While CLAUDE.md holds static rules like coding conventions, MEMORY.md must be manually updated to reflect time-sensitive project changes and decisions.
- ▪Auto memory in Claude v2.0.64 captures general patterns after multiple sessions but does not retain specific, intentional project decisions.
- ▪Setting up MEMORY.md takes about five minutes and involves creating pointer entries that reference where key project information is located, not the details themselves.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 3878878) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } ShipWithAI Posted on May 2 • Originally published at shipwithai.io Claude Code Forgets Everything Between Sessions. MEMORY.md Fixes That #ai #programming #productivity #claude Harness engineering (7 Part Series) 1 Harness Engineering: Why the System Around AI Matters More Than the AI Itself 2 Beyond CLAUDE.md: 5 Layers Your AI Agent Harness Is Missing ... 3 more parts... 3 Your CLAUDE.md Is an Instruction File. It Should Be a Failure Log.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).