{"version":"2.1.332","anchor":"postcompact-hook-output-now-passes-through-a-formatter","canonical_anchor":"postcompact-hook-output-now-passes-through-a-formatter","heading":"PostCompact hook output is formatted before it is shown","tier":"notice","area":"Hooks","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332\/e\/postcompact-hook-output-now-passes-through-a-formatter","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.332","markdown":"### PostCompact hook output is formatted before it is shown\n\nOutput from a `PostCompact` hook is now passed through a formatter before it appears in the success or failure message\n\n**Unclear.** It is not clear what the formatting step does to the output, such as whether it shortens it.\n\n**What**\n\nA `PostCompact` hook is a command you configure to run after Claude Code compacts the conversation (summarizes it to free up space). Claude Code reports whether the hook \"completed successfully\" or \"failed\" and includes its output. That output now goes through a formatting step first. Before, it was the hook's raw output with surrounding blank space trimmed.\n\n**Why**\n\nIf your hook prints long or unusual output, what you see in these messages may now look different from what the hook printed.\n\n- Area: Hooks\n- Names: `PostCompact`\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 1\/5\n- Scope: individual\n- Heads-up: no"}