{"version":"2.1.334","anchor":"compaction-no-longer-blocked-by-precompact-hook-new-message","canonical_anchor":"compaction-no-longer-blocked-by-precompact-hook-new-message","heading":"Claude Code tells you when it compacts despite a PreCompact hook's block","tier":"notice","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334\/e\/compaction-no-longer-blocked-by-precompact-hook-new-message","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.334","markdown":"### Claude Code tells you when it compacts despite a PreCompact hook's block\n\nA new message says the conversation was too long, so Claude Code compacted it even though a PreCompact hook blocked it\n\n**What**\n\nCompaction is when Claude Code summarises the earlier part of a conversation so it fits in what the model can read. A `PreCompact` hook is a command you set up to run before compaction, and it can block it.\n\nClaude Code now has a message for the case where it compacts anyway: \"Conversation too long, so it was compacted despite a PreCompact hook's block.\"\n\n**Why**\n\nIf you write `PreCompact` hooks, this tells you a block from your hook is not final. When the conversation is too long, compaction can still go ahead.\n\n- Area: Hooks\n- Names: `PreCompact`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}