{"version":"2.1.267","anchor":"compaction-path-records-whether-it-was-replaced-by-hook-vs","canonical_anchor":"compaction-path-records-whether-it-was-replaced-by-hook-vs","heading":"Compaction path records whether it was 'replaced by hook' vs core-run","tier":"internal","area":"Compaction","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.267\/e\/compaction-path-records-whether-it-was-replaced-by-hook-vs","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.267","markdown":"### Compaction path records whether it was 'replaced by hook' vs core-run\n\nCompaction now records when a hook fully replaced Claude Code's own summarization logic\n\n**What**\n\nWhen Claude Code compacts a conversation (shrinking old messages into a summary to save space), it now builds a marker recording whether the built-in compaction process actually ran, or whether a `session.compact` hook replaced it entirely. This is reported along with token counts through a new telemetry event, `tengu_compact_replaced_by_hook`.\n\n**Why**\n\nThis gives Claude Code (and whoever reviews this telemetry) visibility into whether a custom hook is taking over compaction instead of the default logic, which matters for diagnosing unexpected compaction behavior.\n\n- Area: Compaction\n- Tier: Under the hood\n- Useful: 1\/5\n- Signal: 1\/5"}