NRT Agentic AI Michigan State University

REFERENCE — NOT PART OF A DEMO

Memory and sessions

“Claude Code forgets everything when I quit.” It does not, quite — but what it keeps is not the thing most people expect. Three different systems get called “memory”, and knowing which one you want is the whole answer.

The four core demos All demos

← Back to the course page

Three things people call memory

whatwho writes ithow long it lasts
The conversation
context
the sessionUntil you quit. It is saved, and you can reopen it — but it is not carried into a new session automatically.
CLAUDE.md
project memory
youForever. Read at the start of every session in that project. This is the one to use when you want something remembered on purpose.
Auto memoryClaudeAcross sessions in that project, on that machine. On by default. Claude writes notes to itself from corrections and patterns it notices.

The complaint — “it forgot” — is almost always about the first row. The fix is usually the second.


Picking up where you left off

From the folder you were working in:

claude --continue        # reopen the most recent conversation in this directory
claude --resume          # open a picker of this project's conversations
claude --resume <name>   # or by session name / id, from anywhere

Inside a running session, /resume opens the same picker and switches conversations.

Transcripts live in ~/.claude/projects/<project>/<session-id>.jsonl, keyed to the project directory — which is why --continue in a different folder does not find the session you want. All worktrees of one repository share a directory.

What a resumed session brings back — and what it does not
comes backdoes not
The conversation history, including tool calls and their resultsThe context. The transcript is there, but files are not re-read for you — Claude fetches them again when it needs them
The model, and the agent if you started with --agent“Allow for this session” permission grants. You approve them again, unless you wrote them into a settings file
CLAUDE.md and auto memoryMCP trust choices — the “New MCP server found in this project” answer
Unexpired scheduled tasksFlags you passed on the command line: --mcp-config, --settings, --add-dir

Sessions started with claude -p are hidden from the picker and from --continue, but can still be resumed by session id.


The memory you write: CLAUDE.md

A plain markdown file, read into context at the start of every session. If you find yourself telling Claude the same thing every morning — which script is the real entry point, what the units are, which directory never to touch — that sentence belongs here instead.

/memory lists every memory file in play and opens them for editing.

The four places a CLAUDE.md can live
filewho sees ituse it for
managed policy
(set by your organisation)
everyone in the orgrules you do not control
~/.claude/CLAUDE.mdyou, in every projectpersonal habits — how you like things explained
./CLAUDE.md
or ./.claude/CLAUDE.md
the whole team, through gitthe project's facts. This is the useful one
./CLAUDE.local.mdyou, in this projectyour own notes, not committed

They combine rather than override — all of them are loaded, broadest first, so the most specific file is read last. A CLAUDE.md in a subdirectory loads only when Claude opens a file there.


The memory Claude writes: auto memory

Separate from CLAUDE.md, on by default, and the reason a new session sometimes does seem to know things. Claude keeps notes to itself — corrections you made, how you work, what the project is about — in ~/.claude/projects/<project>/memory/, and reads an index of them at startup.

Three properties worth knowing before you rely on it:


Context is not memory

/compact replaces the conversation so far with a summary, to buy room. It changes what you are carrying; it does not touch what is written down. CLAUDE.md is re-read from disk afterwards and auto memory is untouched — but an instruction you only ever said out loud in the conversation may not survive.

If it matters after a compaction, it belongs in a file.


What to do, by what you actually want

you wantdo this
To carry on this afternoon from this morningclaude --continue, from the same folder
A particular conversation from last weekclaude --resume and pick it
Claude to always know something about this projectWrite it in ./CLAUDE.md and commit it
To stop re-explaining a personal preference~/.claude/CLAUDE.md
To see what is being remembered at all/memory
A clean room — no memory, no historyA new session in a fresh directory, with auto memory off

Cowork and Claude Code are not doing the same thing

Cowork keeps a session alive: one long conversation with its own workspace, which is why it feels continuous. Claude Code keeps a project: conversations are saved per folder and reopened on request, and the things meant to persist are files in the repository that your collaborators also get.

That is a real design difference, not a missing feature. Cowork remembers what happened; Claude Code remembers what you wrote down. The second is the one that survives a new laptop, a new team member, and six months.

For the demos on this site. If you are comparing token counts between Demo 1 and Demo 2, or checking whether a refusal came from the schema rather than from something Claude remembered, start from a clean room — a fresh directory, auto memory off. Memory is a feature everywhere except in a measurement.