Problem
After running /compact, the contents of CLAUDE.md (project instructions) are summarized along with the rest of the conversation history. This means project-specific rules, conventions, and constraints defined in CLAUDE.md may be partially or fully lost after compaction.
This is particularly problematic for projects with detailed governance rules (commit conventions, push procedures, naming conventions, security rules, etc.) that must be followed consistently throughout the entire session — including after a compact.
Expected behavior
CLAUDE.md project instructions should be re-injected in full after /compact, similar to how they are injected at conversation start. They are not conversation history — they are persistent project context that should survive compaction.
Current workaround
After every /compact, the user must manually say "read CLAUDE.md" to restore the project instructions. This is easy to forget and defeats the purpose of having a persistent project configuration file.
Proposal
Treat CLAUDE.md content as a system-level invariant that is always present in context, not as part of the conversation history that gets compacted. After /compact, re-inject the full CLAUDE.md content automatically.
Environment
- Claude Code CLI
- Observed with Claude Opus 4.6
Problem
After running
/compact, the contents ofCLAUDE.md(project instructions) are summarized along with the rest of the conversation history. This means project-specific rules, conventions, and constraints defined inCLAUDE.mdmay be partially or fully lost after compaction.This is particularly problematic for projects with detailed governance rules (commit conventions, push procedures, naming conventions, security rules, etc.) that must be followed consistently throughout the entire session — including after a compact.
Expected behavior
CLAUDE.mdproject instructions should be re-injected in full after/compact, similar to how they are injected at conversation start. They are not conversation history — they are persistent project context that should survive compaction.Current workaround
After every
/compact, the user must manually say "read CLAUDE.md" to restore the project instructions. This is easy to forget and defeats the purpose of having a persistent project configuration file.Proposal
Treat
CLAUDE.mdcontent as a system-level invariant that is always present in context, not as part of the conversation history that gets compacted. After/compact, re-inject the fullCLAUDE.mdcontent automatically.Environment