Claude Code repeatedly ignores its own auto-memory feedback during sessions

Resolved 💬 6 comments Opened Mar 23, 2026 by adi-tonkean Closed Apr 21, 2026

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

  1. User corrects a behavior (e.g., "don't use for loops with newlines, they trigger permission prompts")
  2. Claude saves a memory file with the feedback
  3. Within minutes, Claude does the exact same thing again
  4. User corrects again
  5. 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 -c with multiline newlines (4 times)
  • Used for loop with newlines (2 times)
  • Used node -e with 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

  1. Feedback memories should be weighted more heavily than general instructions — they represent explicit user corrections
  2. Before executing tool calls, the model should cross-reference against feedback memories (especially recently saved ones)
  3. Consider surfacing a warning when the model is about to take an action that contradicts a saved memory
  4. Memory acknowledgment ("I have this in memory") without behavior change should be flagged as a failure mode

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗