Claude Code-ordliste
Compaction
Compaction summarizes conversations to free context window space, automatically or on command.
Også kalt: auto-compact, /compact, context compaction, conversation summarized
Compaction is what happens when the context window fills up: the conversation is summarized to free space. Auto-compaction happens automatically; /compact triggers it manually. What survives matters more than most people realize.
Verified: auto-compaction carries INVOKED SKILLS forward within a token budget — when the conversation is summarized, Claude Code re-attaches the most recent invocation of each skill after the summary, keeping the first 5,000 tokens of each. Re-attached skills share a combined budget of 25,000 tokens, filled starting from the most recently invoked skill, so older skills can be dropped entirely after compaction if you invoked many in one session.
Project-root CLAUDE.md also survives: after /compact, Claude re-reads it from disk and re-injects it. Nested CLAUDE.md files in subdirectories are NOT re-injected automatically; they reload the next time Claude reads a file in that subdirectory. So if an instruction disappeared after compaction, it was either given only in conversation or lives in a nested CLAUDE.md that has not reloaded. The PreCompact and PostCompact hook events fire around this.
Practical consequence: a long session that invoked a dozen skills will not still have all twelve in context afterwards. This process is related to managing the context-window and can be influenced by progressive-disclosure techniques. Skills like Compact Guard can help manage state across compaction events.