Context compaction
Context compaction is when a long conversation is summarized to fit the model’s context window. It frees space but can drop detail, which is why instructions read once at the start tend to lose force after a compaction.
This is a main reason an agent drifts from your CLAUDE.md mid-session. Re-asserting the rules after compaction, which a hook can do, is the fix.
Related