# Auto Memory: Claude Code Remembers What You Teach It Claude Code can remember preferences, decisions, and context across sessions. This is not a plugin or an add-on. It is built in. Once you know how to trigger it, Claude gets progressively more useful with every session. Companion repo for the article [Auto Memory: Claude Code Remembers What You Teach It](https://fromaitochitta.com/cc-013) on From AI to Chitta. --- ## What You Will Learn By working through the exercises in this repo, you will be able to: - Trigger auto memory by telling Claude what to remember, and verify the memory file was created - Structure MEMORY.md with a lightweight index and separate topic files to stay under the 200-line limit - Prove that memory persists across sessions and shapes Claude's behavior without you repeating yourself These are not theoretical outcomes. Complete the exercises and you will have a working memory system in your own project. ## Prerequisites - Claude Code v2.1.59 or later installed (`claude --version` prints a version) - A Claude Pro, Team, or Enterprise subscription - A project directory to practice on (this repo works fine) No npm install, no Docker, no build step. ## Exercises | # | Exercise | What It Covers | |---|----------|---------------| | 01 | [Trigger Memory](exercises/01-trigger-memory.md) | Make Claude remember something and verify it sticks | | 02 | [Structure Memory](exercises/02-structure-memory.md) | MEMORY.md index and topic files, the 200-line limit | | 03 | [Cross-Session Persistence](exercises/03-cross-session.md) | Prove memory accumulates and shapes behavior | Start at `exercises/01-trigger-memory.md`. Each exercise links to the next. ## How to Use This Repo **"Show me what it does":** Browse `exercises/` and read through the steps. Understand the pattern before you run anything. **"Let me actually do it":** Open Claude Code in this directory and follow the exercises in order. Each one has an expected output section so you know when you have succeeded. ```bash git clone https://git.fromaitochitta.com/fromaitochitta/claude-code-auto-memory.git cd claude-code-auto-memory claude ``` Then open `exercises/01-trigger-memory.md` and follow the steps. ## A Note on Machine-Local Memory Memory files are stored on your local machine under `~/.claude/projects//memory/`. They are not synced to git, not shared with other machines, and not visible to anyone else. If you clone this repo on a different machine, you start fresh. This is by design. ## Domain **Claude Code Memory and Instructions** - This repo is part of the Claude Code Memory and Instructions series on From AI to Chitta. See the full series for related concepts. ## About Built by [Kjell Tore Guttormsen](https://fromaitochitta.com) as part of the From AI to Chitta project, exploring the intersection of AI tools and inner development. MIT License.