claude-code - 💡(How to fix) Fix Memory save requests ignored — session context lost, tokens wasted [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52380Fetched 2026-04-24 06:08:43
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Code Example



---
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues for similar behavior reports
  • This report does NOT contain sensitive information (API keys, passwords, etc.)

Type of Behavior Issue

Other unexpected behavior

What You Asked Claude to Do

I explicitly asked Claude to save memory mid-session. Multiple times. It said "I'll save it" and did absolutely nothing. Then context compression hit, wiped everything, and the next session had zero memory of prior work.

Rinse and repeat. Every. Single. Session.

What Claude Actually Did

What Actually Happened: Memory writes were deferred or silently skipped. Context compression fired first. Hours of session context — gone. Had to re-explain everything from scratch, burning a significant chunk of tokens in the process.

At this point I'm genuinely wondering if the token waste is a feature, not a bug.

Expected Behavior

Expected Behavior: When a user says "save this" — save it. Immediately. Not after finishing the current task. Not eventually. Now.

Files Affected

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

Yes, every time with the same prompt

Steps to Reproduce

No response

Claude Model

Sonnet

Relevant Conversation

Impact

Critical - Data loss or corrupted project

Claude Code Version

2.1.118

Platform

Anthropic API

Additional Context

Environment:

  • Claude Code, Windows 11
  • Model: claude-sonnet-4-6
  • Sessions: multiple, same issue every time

extent analysis

TL;DR

The issue can be mitigated by rephrasing the "save memory" prompt to ensure immediate action, as the current implementation may defer or skip memory writes.

Guidance

  • Verify that the "save memory" prompt is being interpreted correctly by Claude, and consider rephrasing it to a more explicit command.
  • Check if there are any specific guidelines or documentation for the Sonnet model on how to handle memory saving and context compression.
  • Test if the issue persists with a different model or version of Claude Code to isolate the problem.
  • Consider providing more context or details about the conversation and prompts leading up to the "save memory" command to help identify potential patterns or triggers.

Notes

The issue may be specific to the Sonnet model or the 2.1.118 version of Claude Code, and further investigation is needed to determine the root cause.

Recommendation

Apply workaround: Rephrase the "save memory" prompt to a more explicit command, such as "save context now" or "immediately save memory", to see if it resolves the issue. This is recommended because it is a low-risk change that can potentially mitigate the problem without requiring significant updates or changes to the underlying system.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING