AI Corner

Long Claude sessions without memory loss

A long Claude session works well for days, then suddenly makes mistake after mistake. This is why, and a small kit of three parts that prevents it.

The problem

Inside a session, Claude remembers only what fits in its context window. When the window is full, Claude Code compacts it: the older part of the conversation becomes a short summary. The details are gone, and Claude doesn't notice. It goes on confidently with wrong paths, forgotten rules and old decisions. Correcting it in the same session makes it worse: every correction adds more text to a window that is already full.

How the context window fills up during a session, what compaction keeps, and how the Session view warns you at 80 and 90 percent

The kit, in the order you use it

  1. Start with a prompt Safe Start, Prompt 0, finds out by itself whether the project is new, a normal restart or a broken session. Claude reads the project's files and waits for your "go".
  2. Work with the session-guard skill The project's memory lives in files: CLAUDE.md for rules and paths, MEMORY.md for current facts, the session notes for the log. Claude reads them at the start of every task and checks the project's health.
  3. Let the Session view warn you AI Usage Meter shows how full the session is: yellow at 80 %, red at 90 %, before Claude Code compacts it.
  4. End with a note At the end of every task, the skill proposes a short session note: what was done, what is open, the next step. Safe Start's Prompt D does the same for the whole session.
  5. Start fresh The new session reads only the latest note, and goes on where you stopped, with nothing forgotten.

The three parts

Works in Claude Code. In Cowork the prompts ask Claude to read the project files on purpose, because Cowork does not load them by itself. The Session view sees the Claude Code sessions on this PC only.

Ask for the prompts or the skill

Your details are only used to answer you. See privacy.