Manual5. Context and Memory

5. Context and Memory

Sessions do not share memory. Information persists between sessions only where it is written to a file.

SubjectBehaviorCommand
Context windowAll material read during a session occupies a single window./context reports usage.
CompactionWhen the window is full, earlier messages are replaced by a summary and detail is lost./compact performs it early. Content to retain may be specified: /compact keep the open pull requests.
RulesStored in CLAUDE.md files. ~/.claude/CLAUDE.md applies to every project, and each project directory may hold its own. They are read at the start of every session.Instruct Claude to "add this to CLAUDE.md".
Automatic memoryCorrections and preferences are saved for each project./memory opens the rule files and the saved notes.

Verified November 23, 2026 against Claude Code 2.1.327. References

Wetware Labs is a Kansas City software and search marketing firm. We run search programs for service businesses: technical health, local search, content and AI search.

Start with an audit