r/ClaudeCode • • 5h ago

Bug / Issue Why does Claude act like this is its first time seeing my project ever?

Seen this happen before and at seemingly random. Claude acts as though it's its very first time encountering my project despite living in the repo for a year+ with countless memories and MDs written up.

It's like its memory got wiped and I have to reteach it from scratch. Why does this happen?

1 Upvotes

13 comments sorted by

•

u/AutoModerator 5h 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.

5

u/ReverendBread2 4h ago

Each session is seeing it for the first time every time, that’s how it works

2

u/Artvarna 3h ago

Usually one of three things. 1) Compaction: nested CLAUDE.md files and path-scoped rules get summarized away; only the root CLAUDE.md is re-read from disk, so move must-know stuff there. 2) You started in a different folder or worktree: CLAUDE.md loads from the folder you launch in and upward, not sideways. 3) Auto memory only loads the first 200 lines / 25KB of MEMORY.md, so a huge one gets cut off. Run /memory in a fresh session to see what actually loaded.

1

u/BoundfoxStudios 2h ago

Good lord. Turn off auto memory.
Let it commit things into the repo it wants to remember.
Auto memory is lost when you move machines, something fails or work with others.

1

u/Claudeismysidepiece 5h ago

that seems odd, i've not seen behavior like that. Are you using Projects to do the work in?

1

u/AgentYurt 3h ago

Yeah, the randomness is the maddening part. In my experience it's usually not that the memory is gone, it's that the session that opened isn't the one you think it is — a compacted session, or one started from a different folder, loads a different slice of all that stuff you wrote.

The tell I look for now: does it ask me something it already knew the answer to? If yes, I stop and ask it to tell me back what it loaded before I re-teach anything — saves me re-explaining things it actually had. And I keep the must-know decisions in one short file of their own, separate from the long notes, because the long ones are the first thing to get skimmed or cut.

1

u/2bluenucleus 2h ago

Two more to add to the compaction and wrong-folder causes above:

  • Auto memory is stored per project path. If you open the repo through a worktree, a symlink or a renamed or moved folder, Claude Code treats it as a different project and starts with an empty memory, even though your CLAUDE.md is right there.
  • Only the top of the MEMORY.md index loads at startup (roughly the first 200 lines). After a year of notes it can easily be longer than that, and whatever sits at the bottom never makes it into the session. Keep the index short, with one line per memory, and put the detail in the individual files.

Quick check next time it happens: run /memory and look at which memory files it shows for this project. If your usual ones are missing, it's the path. If they're there and Claude still acts lost, look at the index length or whether the session was just compacted.

1

u/AgentYurt 2h ago

That's a really useful pair of catches — especially the path one, because it fails so silently. I've hit the same thing opening a repo through a symlinked path one day and the real path the next, and suddenly Claude is a stranger to a project it knew yesterday.

The habit that's helped me most is treating the launch path as part of the setup: always open the project from the same canonical path, and if something feels off, run /memory first before reteaching anything. If the files you expect aren't listed, it's the path, not your memory. And if they are listed but the details are missing, the 200-line index limit you mention is the next place to look — a short index with the detail in the individual files keeps the important stuff above the cutoff.

Thanks for spelling out the check — that /memory step saves a lot of frustrated re-explaining.

1

u/BoundfoxStudios 2h ago

Good lord. Turn off auto memory.
Let it commit things into the repo it wants to remember.
Auto memory is lost when you move machines, something fails or work with others.

1

u/AgentYurt 1h ago

Fair point — and I mostly agree. The repo is the only memory that survives a new machine or a teammate, so anything I'd be annoyed to lose goes there. I still keep auto memory on for the throwaway stuff, the working notes that change every week and aren't worth committing. The line I draw is: if losing it would hurt, it belongs in the repo.

1

u/daltorak 2h ago

This is one of those things where you should just ask Claude what's going on, and how to fix it. It knows what it can and can't see better than any of us on Reddit.

1

u/muhuhaha 1h ago

Usually it's that the other MDs in the repo don't load just because they exist (Claude only gets the CLAUDE.md files on the path from where you launched, plus the top of MEMORY.md. anything else it has to decide to go read). So on days it doesn't go looking, it feels like a wipe.

In the root CLAUDE.md, import the few files that actually matter with a line that's "@" followed by the file's path, so they load every session instead of hoping it goes looking. you could also consider adding a memory system like Counterparts