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

Feature Request: Auto-read CLAUDE.md after context compaction

Open NahumKorda opened this issue 11 months ago • 2 comments

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.

NahumKorda avatar Dec 19 '25 08:12 NahumKorda

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/6354
  2. 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

github-actions[bot] avatar Dec 19 '25 08:12 github-actions[bot]

Same need here! Claude Forgets Everything after context compact!

WGSTecnologia avatar Dec 31 '25 01:12 WGSTecnologia

Duplicate of #6354

asvishnyakov avatar Jan 29 '26 22:01 asvishnyakov

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] avatar Feb 28 '26 22:02 github-actions[bot]

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.

github-actions[bot] avatar Mar 08 '26 14:03 github-actions[bot]