Feature Request: Auto-read CLAUDE.md after context compaction
Feature Request
After context compaction (summarization), Claude Code should automatically re-read the user's CLAUDE.md file before taking any action.
Problem
Currently, rules in CLAUDE.md can include instructions like "After any context compaction, re-read this file before taking any action" - but Claude does not reliably follow this instruction. The model forgets to do so after compaction.
Proposed Solution
Add a built-in behavior that automatically re-reads ~/.claude/CLAUDE.md (and project-level CLAUDE.md) after any context compaction event, ensuring user-defined rules are always applied.
Alternatives Considered
- Adding the rule to CLAUDE.md (unreliable)
- Using hooks (no post-compaction hook exists)
Additional Context
This would make CLAUDE.md rules more reliable across long sessions where compaction occurs.
Found 2 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/6354
- https://github.com/anthropics/claude-code/issues/4017
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
Same need here! Claude Forgets Everything after context compact!
Duplicate of #6354
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.