claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Claude keeps forgetting about the context in CLAUDE.local.md after compacting

Open siovene opened this issue 7 months ago • 3 comments

Environment

  • Platform (select one):
    • [X] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [ ] Other:
  • Claude CLI version: 0.2.106
  • Operating System: MacOS 15.2
  • Terminal: Terminal App

Bug Description

I have some generic guidelines for Claude in CLAUDE.local.md, a .gitignored file in project's directory. One of them instructs it about using docker to run the tests of my app.

Steps to Reproduce

  1. Prepare CLAUDE.local.md file with specific instructions
  2. Run a session until auto-compact
  3. Ask Claude to do something for which those instructions would've been necessary

Expected Behavior

After a sessions gets autocompacted, Claude Code forgets about that, and I have to keep reminding it.

Actual Behavior

I would like to see Claude have the CLAUDE.local.md file in memory at all times.

siovene avatar May 09 '25 10:05 siovene

Same Problem here. THe whole CLAUDE.md stuff seems to need a redo.

philkunz avatar May 09 '25 13:05 philkunz

Confirmed. I have been forced to remind Claude to read claude.md for two months. Depending on the auto-compact timing, Claude can at times even ignore the analysis and summary. Not meaning to conflate different issues, but the chat initialization does seem to need an overhaul.

nitefliteuk avatar May 10 '25 19:05 nitefliteuk

Yes, this is one of the very few really annoying bugs. Limits the professional usage. It forgets the slash functions, too. CC is still the best, though:)

vargalas avatar May 23 '25 22:05 vargalas

This is a tough one to constantly deal with. Trying to catch it after each compact and tell it to reread claude.md and related rules is a big challenge.

outdooricon avatar Jul 12 '25 11:07 outdooricon

THIS is a general problem on all platforms. And it is really annoying to be forced to decide to loose project context or coding regulation context. or remember to instruct the LLM to re read claude.md. 24 * 100$/month customer.

FIX this. gemini-cli does not have this issue.

TimoGoetze avatar Aug 06 '25 18:08 TimoGoetze