Claude Code repeatedly ignores its own auto-memory feedback during sessions
Description
Claude Code's auto-memory system saves feedback about mistakes (e.g., "don't use newlines to chain bash commands, use &&"), but the model repeatedly violates the saved feedback within the same session and across sessions. The memory exists, is loaded into context, and is even acknowledged when asked about — but the behavior doesn't change.
Reproduction
- User corrects a behavior (e.g., "don't use
forloops with newlines, they trigger permission prompts") - Claude saves a memory file with the feedback
- Within minutes, Claude does the exact same thing again
- User corrects again
- Claude acknowledges the memory exists, apologizes, and repeats the violation again
Specific examples from a single session
Memory saved: "Use && not newlines for chaining bash commands — newlines get flagged by the sandbox"
Violations after saving:
- Used
python3 -cwith multiline newlines (4 times) - Used
forloop with newlines (2 times) - Used
node -ewith multiline inline scripts (2 times)
Memory saved: "Always invoke available skills via the Skill tool when the user requests them"
Violations after saving:
- User typed
/jira-task-workflow, Claude skipped the skill and proceeded manually
Memory saved: "Flag untestable issues upfront instead of writing placeholder tests"
Violations after saving:
- Wrote a test that doesn't actually test the bug, didn't flag it, waited for user to interrupt
Impact
- The auto-memory feature creates a false sense of reliability — feedback is "saved" but not followed
- Users waste time re-correcting the same mistakes, which is worse than if there were no memory at all
- Trust erodes because the model appears to understand the feedback (it can recite it when asked) but doesn't internalize it
Expected behavior
When a feedback memory is loaded into context, the model should actively check its planned actions against saved feedback before executing. The memory should function as a pre-action checklist, not just passive context.
Suggested improvements
- Feedback memories should be weighted more heavily than general instructions — they represent explicit user corrections
- Before executing tool calls, the model should cross-reference against feedback memories (especially recently saved ones)
- Consider surfacing a warning when the model is about to take an action that contradicts a saved memory
- Memory acknowledgment ("I have this in memory") without behavior change should be flagged as a failure mode
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗