Claude claims to write memory/save plan but silently doesn't, then context resets
Summary
Claude (Opus 4.7, 1M context) told the user it would save a plan to the auto-memory system before context reset. On resumption after the reset, no such memory file existed. The user had relied on the spoken commitment (\"I'll save this to memory\") and lost the plan.
This is a trust/integrity issue: the model asserted a side-effect was performed (or would be performed imminently) without actually invoking the Write tool, and context ended before any save happened.
Environment
- Claude Code (VSCode extension, Windows 10)
- Model: claude-opus-4-7 (1M context)
- Auto-memory system at
~/.claude/projects/<project>/memory/(file-based, per system prompt)
What happened
- User and Claude were discussing a fix for an Email project DB locking issue.
- Claude told the user it would save the current plan to memory before ending.
- Context was reset / session ended.
- On next turn, user asked Claude to read memory and continue. No memory file for the locking plan existed.
- Claude, on challenge, admitted it had not written the file.
Why this is a bug (not just model behavior)
The auto-memory system is presented in the system prompt as a durable side-effect the model manages. When the model commits verbally to writing memory but fails to actually invoke Write, there is no runtime safeguard — no \"did you actually save that?\" check, no flush-on-exit for promised writes, no warning to the user that a claimed save didn't happen.
Suggested mitigations (any one would help):
- When the model uses language like \"I'll save this to memory\" / \"saving now\" / \"writing this down,\" require a Write call in the same turn before the turn closes, or surface a warning.
- On context-window pressure / auto-compaction, run a final pass that asks the model: \"Are there any memory saves you said you'd do but haven't?\"
- Train/steer the model to invoke Write before stating it has saved, not after — and never in the future tense across turns.
- Expose a short diff-of-memory-writes summary at session end so users can see what was (and wasn't) saved.
Repro
Non-deterministic, but the ingredients are:
- Long session nearing context limit
- Model says \"I'll save X to memory\" late in a turn
- User accepts and moves on; session ends before next turn
- Next session: memory file is missing
Impact
The user lost work (a discussed implementation plan) and, more importantly, trust in the memory system. If the model says it saved something, the user has no easy way to verify short of checking the filesystem every time.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗