Intermediate · Memory & Context
Claude Session Memory
Claude forgets everything when a session ends. Here's how to fix that without waiting for a feature.
Why Claude forgets — and why that's your problem to solve
Every Claude conversation starts from zero. When the session ends, the context window closes and everything in it is gone. This isn't a limitation Anthropic is planning to fix later — stateless conversations are a design property of how large language models work. The conversation context exists for the duration of the session and nowhere else.
For casual use, this rarely matters. For productive daily use, it's the central problem. If you're running real work through Claude — drafting, reviewing, tracking, planning — you will spend a significant fraction of every session re-explaining context that should already be established. The session file pattern is the standard solution.
The fixThe session file: what it is and how it works
A session file is a plaintext document you maintain yourself. It's short — typically 150 to 300 words — and it contains exactly the context Claude needs to pick up where you left off. You paste it at the top of each new conversation before your first real question. Claude reads it, has context, and responds as if it remembers the last three sessions because, in functional terms, it now does.
The update loop is as important as the file itself. At the close of each session, you spend two minutes updating the file: mark resolved items done, add new open items, log any decisions that changed direction. If you skip the close step, the file drifts. A session file that hasn't been updated in a week is worse than no session file at all — it anchors Claude to stale context with authority.
What to includeStructure of a working session file
The session file doesn't need formal structure, but the following fields consistently earn their space:
- Current focus — one sentence on what project or problem is active right now.
- Open items — a numbered list of unresolved tasks or decisions, each with a one-line status.
- Recent decisions — the last two or three things that were decided, so Claude doesn't suggest options you've already closed.
- Constraints — anything standing that Claude should know: scope limits, non-negotiables, preferences.
- Updated — the date. If it's more than three days old, Claude should probably flag it.
What doesn't belong in the session file: long background, reference material, or anything that never changes. Those belong in a separate context document you attach separately when relevant.
Close every session, not just the ones that matter
The session file degrades without maintenance. The decay is predictable: you skip the close step when you're tired or when a session felt minor, the file drifts, and three sessions later you're loading stale context that actively misleads Claude. The discipline is simple — close every session, even if the update is just one line.
A useful close prompt to run at the end of any session:
That output pastes directly into the session file in under a minute. The open step tomorrow takes thirty seconds. Across a week of daily sessions, this saves hours of re-orientation time.
Claude Code usersCLAUDE.md is not a session file
Claude Code reads CLAUDE.md files in your project directory, which gives it persistent project-level context. This is useful, but it's not the same thing as a session file. CLAUDE.md holds stable project context — architecture decisions, coding conventions, toolchain. Your session file holds dynamic state: what changed today, what's unresolved, what direction you took this week. Both are necessary. Neither replaces the other.
Chapter 1 of Book 1 is free
The free first chapter of Patriola's Guide to Claude: Productivity covers the session file end-to-end: structure, update loop, the close prompt, multi-project variants, and how to adapt the pattern for team use where multiple people share a session file.
RelatedA session file is one piece of a larger memory system — see Claude Memory System for the full architecture across weeks and months. For the rest of the daily loop the session file supports, see Claude Productivity.
Get Chapter 1 delivered to your inbox
Subscribe and we'll send you the session memory chapter. One email per book launch after that.