Atlas · agents
Agent memory
A new session starts with an empty context. What an agent like Claude Code remembers comes back from files.
See it working: Plate II, Plate IV
In plain words
A new Claude Code session starts with a fresh context window. When it seems to remember your project, it is reading files: instructions and notes that it or you wrote earlier.
How it works
Claude Code loads CLAUDE.md files at startup, including a personal one for all projects, and loads ones in subfolders only when it works there. A file can pull in another with an @path line. Geoffrey Huntley’s Ralph loop takes the idea to the extreme: the same prompt fed to a fresh agent over and over, with all memory kept in files.
Going deeper
Plate II shows which files load and in what order. Plate IV compares the estimated tokens and cost of continuing one session against starting fresh with a handoff note.
Sources
- How Claude remembers your project Anthropic
Personal preferences for all projects
using @path/to/import syntax.
Files in subdirectories load on demand.
no CLAUDE.md in your working directory or above it.
target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce adherence.
Imports help you organize a long file but don’t reduce its context cost, because imported files load together with the CLAUDE.md that imports them.
Auto memory lets Claude accumulate knowledge across sessions without you writing anything.
The first 200 lines of MEMORY.md, or the first 25KB, whichever comes first, are loaded at the start of every conversation.
- Ralph Wiggum as a "software engineer" Geoffrey Huntley
In its purest form, Ralph is a Bash loop. while :; do cat PROMPT.md | claude-code ; done
Quotes were checked against the live pages on 2026-11-08.