Session memory rules acknowledged and saved but not retained across sessions
Summary
Claude Code has a memory file system — rules and preferences are saved to .md files in a memory directory, read at session start. Despite this process, established rules are repeatedly violated in subsequent sessions. Claude acknowledges the violation, says it will not happen again, and breaks the same rule the next session.
Process in place
- Session start: memory files are read (
feedback.md,session-state.md, etc.) - Session end: memory files are updated with new rules
- Rules are written in plain language with Why and How to apply sections
Documented examples (same project, multiple sessions)
- Issue references: Rule established — always use full issue titles, never numbers alone (e.g. 'Login for Google Github not working (#74)' not '#74'). Rule saved to memory. Violated the next session. Claude said 'I'll use full titles going forward.' Violated the session after that.
- Tool explanations: Rule established — before every tool call, write a sentence explaining what you are about to do and why. Rule confirmed working mid-session. Dropped entirely the next session.
- gh CLI PATH: Workaround for gh CLI not found in bash shell rediscovered every session despite being documented in memory.
Root question
If memory files are confirmed read at session start, why do rules in those files fail to influence behavior within that same session? The files are being read — the rules are not being applied.
Cost to users
Each repeated violation costs tokens to correct, re-document, and re-establish. Users should not have to re-teach the same rule multiple times across paid sessions.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗