Auto memory lets Claude Code preserve model-written project notes across sessions. A small project index enters the prompt at session start, while detailed topic files can be retrieved as needed. This structure provides continuity without putting every detailed note into the prompt. section 4.1.3 section 4.2.2
The notes are candidate context, not verified rules. Keep their model authorship distinguishable from human-owned instructions so their provenance and conflicts can be assessed. An inferred note may be revised or retired automatically; a hard rule requires its human owner. section 4.2.2
Auto memory can influence the model’s next choice, but it cannot enforce a tool boundary. Use managed settings, sandbox restrictions, or hooks for rules that must not be bypassed. A model-written note should not silently rewrite a managed policy or human-owned project rule. section 4.1.3 section 4.2.2
Remembering a failed approach
A project note about a failed approach can serve as candidate failure memory in a later session. It is still a model-authored claim, not a verified lesson. A dedicated Failure Journal can make capture explicit and link candidate diagnoses to raw evidence, with another check before publication. section 4.5.2
Table 4.3 Claude Code persistent-context mechanisms and enforcement boundary
|
Mechanism
|
Writer or owner
|
Scope and load behavior
|
Enforces behavior?
|
|
Managed instruction file
|
Organization administrator
|
Organization context
|
No; use managed settings or sandbox policy
|
|
User memory
|
Human user
|
User context across projects
|
No; prompt context
|
|
Project memory
|
Project team
|
Repository context via source control
|
No; prompt context
|
|
Project rules
|
Project team
|
Topic or path-scoped context
|
No; prompt context
|
|
Local project memory
|
Human user
|
Private context for one project
|
No; prompt context
|
|
Auto memory
|
Model
|
Project index plus retrieved topic detail
|
No; model-written context
|
Compare auto memory’s model ownership and project scope with other persistent-context mechanisms and their enforcement boundaries. section 4.1.3
