Under the hood
Compaction now records when a hook fully replaced Claude Code's own summarization logic
What
When 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.
Why
This 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.