A project memory file is a persistent document that keeps important project guidance available across AI-agent sessions. It addresses a concrete failure: context compaction is lossy, so early instructions and bug-preventing conventions may disappear from conversation history. section 3.5.2
Repeatedly reciting a todo list is an appealing shortcut, but it can bloat the context and make an agent follow obsolete instructions too rigidly. Externalizing durable plans and rules turns ephemeral context engineering into persistent state engineering. section 3.5.2
Use memory files as a compact, deliberately maintained layer of project context:
- Place critical project rules and conventions in a file that the agent rereads when a session starts. section 3.5.2
- Treat the file as durable guidance rather than a transcript; conversation history remains vulnerable to compaction and summarization. section 3.5.2
- Keep instructions flexible enough to support plan changes instead of forcing the agent to obey an outdated checklist. section 3.5.2
Session-reloaded project guidance
A CLAUDE.md file can hold project conventions that should survive conversation trimming. The agent reloads those rules at session start instead of depending on instructions mentioned once in an earlier exchange. section 3.5.2
