What probably matters to youSection of the release
Unclear It is not clear whether automatic compaction ran these hooks through this same path before.
What
Compaction is when Claude Code shortens a long conversation by summarising it, so it fits in the model's memory. A hook is a command of your own that Claude Code runs at a set moment. The PreCompact hook runs just before compaction.
The trigger value the hook receives is now auto when compaction happens automatically. Before, it was always manual.
Why
A PreCompact hook can now tell the two cases apart. A hook that matches on trigger will now see auto for automatic compaction, so check any hook that expected only manual.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed sinceAnthropic's documentation has since written up PreCompact, on Hooks reference.To find a slow hook, search the log for `Hooks:` lines that end in a duration. In Claude Code v2.1.296 or later, each command hook on a tool event, `UserPromptSubmit`, `SessionStart`, `Stop`, and several other events leaves one when it fin…hookssee the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not clear whether automatic compaction ran these hooks through this same path before.
Anthropic's documentation agreesAnthropic's documentation has since written up PreCompact, on Hooks reference.