{"version":"2.1.326","anchor":"reactive-compact-can-run-despite-a-precompact-hook-block","canonical_anchor":"reactive-compact-can-run-despite-a-precompact-hook-block","heading":"Compaction can run even when a PreCompact hook blocks it","tier":"notice","area":"Compaction","scope":"both","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326\/e\/reactive-compact-can-run-despite-a-precompact-hook-block","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.326","markdown":"### Compaction can run even when a PreCompact hook blocks it\n\nIf a request cannot be sent without compacting, Claude Code now compacts anyway even when a PreCompact hook blocks it, and logs that it did\n\n**What**\n\nCompaction shortens the conversation by summarising earlier parts so it fits in what the model can read at once. A `PreCompact` hook is a command you set up to run before compaction, and it can block the compaction.\n\nWhen a request is too large to send as it is, Claude Code compacts in response. In that case it now compacts even if a `PreCompact` hook blocks it, and writes a log line saying so. Before, a block from the hook always stopped the compaction.\n\n**Why**\n\nIt keeps a session from getting stuck when the conversation has grown too large to send. If you rely on a `PreCompact` hook to block compaction, it no longer stops this case.\n\n- Area: Compaction\n- Names: `PreCompact`\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: both\n- Heads-up: yes"}