3.3 La memoria de tu sesión y CLAUDE.md

Info
⏱ Duration: ~15 min · 🎯 Goal: understand why Claude “forgets” in long sessions and write down, in a CLAUDE.md, the rules you want it to always respect in this project.

Your session has a limited work table

Every Code session has a limited work table (the context window). When it fills up, Claude automatically summarizes the earlier part and may lose details. If it seems to forget something you said a while ago, it isn’t failing: it’s full.

Three rules to spend your memory well

  1. Open a NEW session for each new project or feature. The old conversation biases the new one: it drags in context that no longer applies and clutters the reasoning.
  2. Be specific: precise prompts SPEND LESS memory than vague ones. A vague prompt forces Claude to explore and reason more on its own before acting; a specific one gets straight to the point.
  3. For anything you want it to remember ALWAYS, use CLAUDE.md. It isn’t session memory: it’s a file Claude reads every time it starts up in this project.

Exercise: write your CLAUDE.md

Think of CLAUDE.md as the global Cowork instructions you set up in Week 2, but for this folder. In the Code session, send:

Crea un CLAUDE.md con las reglas de este proyecto: cifras en MXN, colores
de la paleta Elektra, los umbrales de semáforo acordados, y nunca borres
ni sobrescribas kpis-elektra.csv.

Verify it: open a NEW session, select the same folder and ask for a small change to the dashboard. It should respect the rules without you repeating them (MXN, palette, traffic lights, and without touching the CSV).

Tip
Subagents also protect your memory: they work apart, at their own table, and only return the result to you —so your main session doesn’t fill up.

✅ Checkpoint

You have a CLAUDE.md in the project folder with at least 3 rules, and you confirmed in a new session that Claude respects them without you reminding it.

Got it? — 2 questions

1. If Claude seems to “forget” something in a long session, what happened? The context window (the work table) filled up and Claude summarized automatically, losing details. It’s not a failure: it’s full. Starting a new session fixes it.

2. When should you use CLAUDE.md instead of repeating instructions? For anything you want Claude to ALWAYS respect in that project (formatting rules, guardrails, untouchable files). CLAUDE.md is read at every startup; it doesn’t depend on session memory.