{"version":"2.1.333","anchor":"plugin-hook-mod-kept-state-mechanism-mod-state-kept","canonical_anchor":"plugin-hook-mod-kept-state-mechanism-mod-state-kept","heading":"Plugins can keep their state through compaction and resume","tier":"internal","area":"Plugin API","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333\/e\/plugin-hook-mod-kept-state-mechanism-mod-state-kept","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.333","markdown":"### Plugins can keep their state through compaction and resume\n\nClaude Code can now carry a plugin's saved state across conversation compaction and when a session is restored\n\n**Unclear.** It is not stated whether plugins can use this yet.\n\n**What**\n\nClaude Code can now keep state that a plugin wants saved and carry it across two events:\n\n- compaction, when Claude Code shortens a long conversation to save space\n\n- restoring a session from its saved transcript\n\nPlugin hooks get a way to read and keep this state. A hook is a point where plugin code can react to what Claude Code does. Claude Code also records usage data when state is kept.\n\n**Why**\n\nIn practice, a plugin's state no longer has to be lost when a conversation is compacted or resumed.\n\n- Area: Plugin API\n- Tier: Under the hood\n- Useful: 3\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}