{"version":"2.1.299","anchor":"hooks-modules-sessionidentity-and-promptmedia-methods-wi","canonical_anchor":"hooks-modules-sessionidentity-and-promptmedia-methods-wi","heading":"Plugin hooks gain session identity and prompt media methods","tier":"use","area":"Plugins","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299\/e\/hooks-modules-sessionidentity-and-promptmedia-methods-wi","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.299","markdown":"### Plugin hooks gain session identity and prompt media methods\n\nPlugin hook modules can now call session.identity and prompt.media, mark registrations as withheld, and get fuller error details\n\n**Unclear.** What `session.identity` and `prompt.media` return or do is not stated.\n\n**What**\n\nPlugins (add-on packages that extend Claude Code) can register hooks, which are handlers Claude Code runs at certain moments. The set of methods these hook modules can call now includes:\n\n- `session.identity`\n\n- `prompt.media`\n\nA hook registration can also carry a `withheld` field. When a hook handler throws an error, Claude Code now passes the error on with the event and the data the handler received attached.\n\n**Why**\n\nThis widens what plugins can do from their hooks, and the extra error details make a failing handler easier to diagnose.\n\n- Area: Plugins\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5\n- Scope: individual\n- Heads-up: no"}