{"version":"2.1.275","anchor":"new-pluginsession-lifecycle-hook-events-sessionend-and-ses","canonical_anchor":"new-pluginsession-lifecycle-hook-events-sessionend-and-ses","heading":"New plugin\/session lifecycle hook events session.end and session.measure","tier":"use","area":"Hooks","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.275\/e\/new-pluginsession-lifecycle-hook-events-sessionend-and-ses","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.275","markdown":"### New plugin\/session lifecycle hook events session.end and session.measure\n\nTwo new lifecycle events, `session.end` and `session.measure`, added for plugins and hooks\n\n**Unclear.** The finding does not say what `session.measure` actually measures or when it fires.\n\n**What**\n\nClaude Code added two new lifecycle events, `session.end` and `session.measure`, to the set of events that plugins and hooks (scripts that run automatically at specific points) can respond to. These join existing session-related events like `session.compact` and `session.attach`. The new events are wired through the schema, an internal raiser mechanism, and real call sites that emit them during a session.\n\n**Why**\n\nThis gives plugins and hooks more points in a session's lifecycle to hook into, specifically when a session ends and when some kind of measurement occurs.\n\n- Area: Hooks\n- Names: `session.end`, `session.measure`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5"}