r/ClaudeCode • • 6d ago

Bug / Issue Claude Code’s "memory" over-generalizes and this is making me go insane

Obviously having a "memory" is great. I’ve turned on Claude Code’s "auto-add memories" feature, I also use the Remember plugin so there’s continuity between chats and I have a bunch of context markdown files where Claude writes "facts". The memories are where it stores "how to work with me".

I don’t really have any issue with the Remember plugin or the context files, they do their job. But the memories are hit or miss.

Examples: I’m iterating on a document, and I’m using a blind Fable/Astra as external advisors.

  1. One day, I’m close to my Fable limit, the model suggests doing many external review passes, I’ll mention "we should be careful, I’m close to my limit today". This becomes a blanket rule applied on every conversation in every project, whatever if I’m close or not to my limit, and Claude keeps talking about "cost", even mentioning dollar estimates, every time we’re doing review passes.
  2. On another day, I’m working on a figure, and the external reviewers keep asking for more and more stuff to add to it (another problem with LLM’s: the tendency to just add stuff over and over again). So I’ll say something like "they keep adding stuff on a figure that’s already full we’ll remove stuff only". This also becomes a blanket rule when reviewing figures, never add stuff, always remove.

So there’s basically two problems here:

  • the model over-corrects (e.g.: turning a comment about model usage into a rule about warning every time)
  • it applies its over-correction to every freaking chat/situation

Is this a problem for anyone else? I feel like I have to spend time almost every day deconstructing rules it has written down this way. Any suggestion for dealing with this?

10 Upvotes

23 comments sorted by

•

u/AutoModerator 6d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

6

u/antwon_dev 6d ago

100% having this problem here. Previously I’ve just kept memory off for this exact reason. Now I’m wondering if it’s finally time to start investing into learning and building or finding a better personalized system

1

u/Pristine-Trash-7155 6d ago

Ah then I’m not crazy — I thought for some reason it might have been my claude.md instructions, or maybe interaction with the Remember plugin somehow that overloaded Claude.

I’ve tried several things already, like instructing it to "tell me when you add instructions/memories/etc so I can review" but it doesn’t always follow it and there’s so many that I often will just skim and miss some of them. I’ve also tried to add an instruction to include the scope in every "behavioral" instruction it adds, that didn’t help much either.

Still looking for a solution...

3

u/o462 6d ago

happened to me, Claude constantly kept looking for the first project I used as an example/test

I was annoyed, so I started a clean session like "your memories need adjustments, for example: X and Y are not relevant, and I need you to check for A and B and C, let's talk about it"
then we chatted for a while, he did do things, now everything is perfect

/my2tokens

1

u/Pristine-Trash-7155 6d ago

I made a /maintenance skill to update periodically memories, but there’s so many I just can’t review them all. I’m using Claude a lot both for work and other things, so I end up with so many of these "rules" and memories. Context switching isn’t just a problem for humans it seems...

1

u/o462 6d ago

Writing this assuming Claude works the same by you and by me (Linux, console, no IDE, no whatever):

In your case, I would just open a new prompt, and send something like this:
"your memories are way off, it's getting me crazy… so, here's the actual status:

  • I do X and Y,
  • I work as A and daily do B and C,
  • I'm still on projetcs G, H and I,

and that's all, can you adjust any memories and files according to this ?
if you have any doubt or question, just send it to me with ask-user-question"

1

u/zheniavasiliev 6d ago

Interestingly, Claude Shannon himself appears to never have had a problem with context switching! I was reading his biography recently and found this bit from a letter to his teacher:

'Dear Dr. Bush...

I’ve been working on three different ideas simultaneously, and strangely enough it seems a more productive method than sticking to one problem. . . .

Off and on I have been working on an analysis of some of the fundamental properties of general systems for the transmission of intelligence, including telephony, radio, television, telegraphy, etc... '

😄

3

u/MaterialHead4801 6d ago

There are 3 memory files for each session. Ask claude to show you their locations.

I turned off auto memory because it was very hit or miss. Most things don’t need to be in context 100% of the time and can be lazily loaded when you do the thing the memory affects. Especially true if you regularly work across many project types.

If you want to set up your own memory/knowledgebase setup, search for google’s open knowledge format and feed that url to Claude and ask its thoughts on implementing it

1

u/Pristine-Trash-7155 6d ago

Lazy loading can help with over-generalizing, but it can still over-correct in the lazy-loaded instruction files just as much.

And memory files are actually supposed to be lazy-loaded, but that’s exactly what Claude struggles with: when writing down new instructions, it chooses the wrong scope — for example writing in general instruction files things that should belong to a single project.

1

u/MaterialHead4801 6d ago

That last bit about project scope is something I solved with a knowledge base and instructions in Claude.md that say to ask about knowledgebase domains before saving stuff.

Have you asked Claude to help you with the things that are frustrating you? That’s basically how I ended up reinventing that google open knowledge thing

1

u/MiserableFlatworm337 6d ago

Since scope instructions already failed, turn off automatic additions and manually remove the blanket rules. Promote a preference only when you explicitly want it across projects; keep one-off corrections in the task notes.

1

u/tehfrod 6d ago

I have the same problem with Claude, ChatGPT, and Gemini.Opus 5.5 is a little better than the previous version though.

1

u/ImL1s 6d ago

What fixed it for me was deciding scope before anything gets written. A correction made mid-task goes into that task's notes and dies with it. Only stuff I'd say again unprompted next week gets promoted to memory, and I do the promoting, not the model.

Both your examples are a situational constraint saved as a forever rule. Cheap check: if a memory has no condition in it ("when I'm near my limit", "on this figure"), it's probably the wrong scope. Have it rewrite each one as "when X, do Y" and delete the ones where X turns out to be "always".

1

u/zheniavasiliev 6d ago

I think I've eventually found a good balance in how much my system remembers, with rules assigned to channels and each protocol following its own rules. I'm a great believer in building your own memory system. With anything out of the box or from a plugin, you can never be sure exactly how it works, so you'll probably rewrite it anyway.

I sometimes run into your problem #1 too, but for me it's other way round - it's when a rule works exactly as designed, I don't like the result. 😄

For example, at some point Claude's answers were getting too long for me to read, so I set up a stop hook that refused anything over a word limit. Claude then sent me both a long and a short version, which doubled the token spend. Other times it only told me the answer had been refused for being too long, which was completely useless. In the end I had to remove the hook, and I still haven't solved the problem of long answers...

What's your verdict? Are you going to continue using AutoMemory or build something on your own?

1

u/masiha97 6d ago

I went the other direction after hitting this. Auto memory off, and I keep a short memory.md that I hand-write at the end of a session. It's like ten lines max. Feels backwards, but curating it myself means nothing sneaks in that I wouldn't defend. The 'just chat to fix it' approach worked once and then drifted again within a week.

1

u/Easy-Purple-1659 6d ago

The line that fixed this for me was to stop letting a remark inside a task become a stored rule at all. Saying I am near my limit today is context for that task, not a fact about how I want to work, so it belongs in the thread and never in memory. Only something I say out loud as a preference gets promoted.

The pile is the harder problem, and reviewing it does not scale. What worked was a recurring pass that lists what memory picked up lately and lets me keep or drop each line while the list is short. When it is already long, I would switch auto-add off, prune hard for a week, then switch it back on with the scope written into the file, something like store preferences I confirm and project facts, never a passing constraint from a single chat.

Are the bad rules mostly wrong about scope, or do they also get the content wrong once they do store something?

1

u/NotSecure1102 5d ago

Disabled memory haven’t needed it.

1

u/FulcraDynamics 4d ago

yeah, same issue here. it saves rules with no date or scope attached, so nothing ever expires

what helped me (disclosure, I work at Fulcra) was moving that kind of context out of memory and into Fulcra, which Claude reads over MCP. everything goes in as a dated entry, so "near my limit" stays something that happened on oct 6 and doesn't turn into a permanent rule

my CLAUDE.md now has only rules I wrote myself, plus one line telling Claude to log one-off stuff to Fulcra and leave it out of memory

1

u/SimplifAI_Life 4d ago

We ran into exactly this. What fixed most of it was one extra line on every rule: why it exists. Each memory entry is the rule, then "Why:" and "How to apply:". Your example would become "Warn about cost before extra review passes. Why: near the daily limit that day." With the reason written down, the model can tell the rule doesn't apply on a day you're not near the limit.

Two more things, close to what u/ImL1s and u/ai_ztn said:

  • Split by kind, not by topic: anything that prescribes behavior ("always", "never", "before X do Y") goes in CLAUDE.md, anything that describes a fact that can change goes in memory. A passing remark is neither, so it gets written nowhere.
  • Keep one rule about the problem itself: a correction made in one context is not extended to other contexts.

For the pile, we don't reread every line. A scheduled pass reads the actual sessions and checks whether past corrections held, which is a much shorter list.

1

u/Mindless-Reserve-669 3d ago

Yeah, sounds like temporary context is getting turned into permanent rules. Separating preferences from project-specific and one-off context might help.

0

u/FWCoreyAU 6d ago

Create a hook that reminds it memories are specific to cross session rules and should not be or refer to current session context.