Auto-memory feedback not reliably applied in subsequent conversations

Resolved 💬 2 comments Opened Apr 4, 2026 by MustHaveCoffee Closed Apr 4, 2026

Bug Description

Claude Code's auto-memory system allows saving feedback memories (corrections, workflow preferences) to .claude/projects/*/memory/ files. These memories are indexed in MEMORY.md and loaded into context each session. However, the saved feedback is not consistently applied in practice — the same mistakes recur across sessions despite having explicit memory entries that should prevent them.

Steps to Reproduce

  1. User corrects Claude's behavior (e.g., "always work in staging directory first, not production")
  2. Claude saves a feedback memory file with the rule, the reason, and how to apply it
  3. The memory is indexed in MEMORY.md and loads correctly in the next session
  4. Claude repeats the same mistake in a subsequent session
  5. User corrects again, Claude saves another memory — cycle repeats

Specific Examples

  • Staging workflow: Despite having a memory that says "all code changes must be made in middle-class-finance-staging/", Claude repeatedly edits files directly in the production directory (middle-class-finance/). The memory file exists, is indexed, and loads into context, but the behavior doesn't change.
  • IP fallback: Despite having a memory about switching from Tailscale IP to LAN IP on failure, Claude continues retrying the failing IP until the user intervenes.
  • Multiple feedback memories on the same topic accumulate without improving adherence (e.g., "use staging for marketing work" and "always work in staging first" are essentially the same correction saved months apart).

Expected Behavior

Feedback memories should reliably influence Claude's behavior in subsequent sessions. If a memory says "before editing ANY file, check that the path starts with middle-class-finance-staging/", that check should actually happen.

Actual Behavior

Memories are saved correctly and load into context, but they don't reliably gate behavior. Claude acknowledges the memories exist but doesn't consistently apply them when making decisions about which files to edit or which commands to run.

Environment

  • Claude Code CLI
  • Model: claude-opus-4-6 (1M context)
  • Memory system: file-based auto-memory in .claude/projects/*/memory/

Possible Root Cause

The memories load as part of a large system context (CLAUDE.md, rules files, memory files). With many rules and memories competing for attention, behavioral memories may not have sufficient "weight" compared to the immediate task context. The memory system stores information but doesn't enforce it as a constraint.

🤖 Generated with Claude Code

View original on GitHub ↗

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