Sweep 19 Sep 2026 · 02:36Z Build v2.1.278 500 read Stable v2.1.267 Latest v2.1.278 Next v2.1.278 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.267 ·

Compaction can now be intercepted and rewritten by a session.compact plugin hook

A new session.compact hook lets plugins intercept and replace Claude Code's conversation-compaction output

TierUse it nowhow much it should matter to you
Useful4my rating, 1 to 5
Signal3worth watching, 1 to 5
AreaCompactionwhat it touches
KindNew Featuresin v2.1.267,
Group of 2 Use it now No documentation found

A new session.compact hook lets plugins intercept and replace Claude Code's conversation-compaction output

What Both live/reactive compaction and precomputed/background compaction now route through a shared step that runs the session.compact plugin hook before falling back to Claude Code's built-in compactor. A compaction hook must return either { messages } (replacement messages) or { skip: reason }. If a hook supplies replacement messages, compaction uses those directly instead of summarizing normally; if a hook rewrites content after a background compaction already ran, the stale precomputed result is discarded.

Why Gives plugins a supported way to control what happens when a conversation gets compacted (summarized to save space), instead of only being able to observe it, useful for plugins that want custom summarization logic or need to preserve specific content.

Read from
Names in the bundlesession.compact

See this entry in the whole of v2.1.267 →