{"version":"1.0.85","anchor":"sessionend-hook-event","canonical_anchor":"sessionend-hook-event","heading":"SessionEnd Hook Event","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/1.0.85\/e\/sessionend-hook-event","release_url":"https:\/\/changelogs.core-directive.com\/v\/1.0.85","markdown":"### SessionEnd Hook Event\n\n**What:** New hook event that fires when Claude Code shuts down, enabling cleanup actions **How to use:**\n\n`# Configure in your hooks file to run cleanup on exit: # Hook will receive: {hook_event_name: \"SessionEnd\", reason: \"logout\" | \"other\"}` **Details:**\n\n- Triggers before Claude Code exits\n- Provides shutdown reason (logout vs other termination)\n- Allows external programs to perform cleanup\n- 2-second timeout ensures quick shutdown"}