The plugin hooks system adds validated event types for session compaction, session receive, and UI resolution
Claude Code's plugin hooks engine now validates three new kinds of hook events:
session.compact, for hooking into conversation compaction (summarizing older context to free up space)session.receiveui.resolve
A hook for session.compact must now return either { messages } (a replacement set of messages) or { skip: reason } to opt out, and the shape of messages is checked. Separately, a provider field on the arguments passed to tool.describe, command.describe and agent.offer hooks is now fixed and can no longer be overridden by a hook.
These changes give plugins defined, checked contracts for reacting to compaction and other events, and stop a hook from spoofing which provider a tool or command claims to come from.
What a session.receive or ui.resolve hook actually lets a plugin do isn't detailed beyond the validation rules.