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.
Why
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.
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed sinceAnthropic's documentation has since written up session.receive, on Use the mods API.`session.receive` and `session.send` let a mod observe the messages. Return `next(e)` from both to pass each message through unchanged:plugins/mods/apisee the edit
Confirmed sinceAnthropic's documentation has since written up ui.resolve, on Draw in the interface with a mod.const { Box, Text } = $.ui.resolve(e)plugins/mods/interfacesee the edit
Added sinceA small documentation edit on Mods reference touched a line naming ui.resolve after this was published.Elements are the building blocks of a tree a `ui.render` hook returns, and you get them from `$.ui.resolve(e)`. [Build a tree from elements](/docs/en/plugins/mods/interface#build-a-tree-from-elements) shows the common ones with how the ter…plugins/mods/referencesee the edit
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtWhat a session.receive or ui.resolve hook actually lets a plugin do isn't detailed beyond the validation rules.
Anthropic's documentation agreesA small documentation edit on Mods reference touched a line naming ui.resolve after this was published.