{"version":"2.1.314","anchor":"precompact-hook-output-capped","canonical_anchor":"precompact-hook-output-capped","heading":"Long output from a PreCompact hook is now cut to a size limit","tier":"notice","area":"Hooks","scope":"individual","heads_up":true,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.314\/e\/precompact-hook-output-capped","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.314","markdown":"### Long output from a PreCompact hook is now cut to a size limit\n\nWhen a PreCompact hook succeeds and prints more than a set number of characters, Claude Code cuts the output and adds a note saying so\n\n**What**\n\nThe `PreCompact` hook runs before compaction, the step where Claude Code shortens a long conversation by summarising it. Before, whatever a successful `PreCompact` hook printed was passed on in full. Now output over a character limit is cut. Claude Code adds a note saying how many characters the output had and what the limit is, and writes a warning to its log.\n\n**Why**\n\nA hook that prints a very large amount of text can no longer swell the compaction prompt. If your hook prints a lot, the end of its output may now be dropped.\n\n- Area: Hooks\n- Names: `PreCompact`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: yes"}