Re-read CLAUDE.md after context compaction
Problem
When a long conversation triggers context compaction (compression of prior messages), Claude Code loses awareness of project-level instructions in CLAUDE.md files. The compaction summary captures conversation state but does not re-read the CLAUDE.md files afterward, so all project rules, file ownership boundaries, workflow instructions, and custom constraints are effectively gone for the rest of the session.
This means CLAUDE.md instructions only work until the first compaction. After that, Claude operates without them — which can lead to violated constraints, wrong workflows, and user frustration.
Expected Behavior
After context compaction, Claude Code should automatically re-read all applicable CLAUDE.md files (project, global, parent directories) before continuing the conversation, just as it does at session start.
Current Behavior
CLAUDE.md contents are loaded at session start and included in the system context. After compaction, they are not re-injected. Claude only has whatever the compaction summary happened to capture, which is lossy and incomplete.
Impact
- Project-specific rules get silently dropped mid-session
- Users have to manually remind Claude of its own instructions
- Longer sessions (where compaction is most likely) are exactly the sessions where CLAUDE.md matters most
🤖 Generated with Claude Code
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗