What
- The plugin capability actions
fs.readFile,fs.writeFile, andfs.listDirare renamed tofs.read,fs.write, andfs.list(including the underlying IPC event name). - Plugins and hooks gain four new capabilities:
session.usage(read session usage stats),settings.read(read merged settings from a named source), andenv.get/env.set(read and write environment variables) — all fully wired with permission checks and handlers. - New validation guards these and other hook APIs: a hook's
on('event')matcher can't be a nested object matched against a primitive;next(e)handlers forenv.get/env.setcan only change the value's data, not other fields; andui.messagecalls can't rewrite fields likesurface,component,requestId,element, ormodule(onlydatamay change), and are rejected if their serialized data is too deeply nested or too large. - A large new subsystem lets plugins mount custom terminal UI elements ("Clients") declared via a
surfacefield inhooks.json. It handles rendering, mounting/unmounting, resizing, mouse and keyboard input, hover/focus state, a row-budget that can reject renders pushing a dialog over its row limit, and message dispatch between the plugin and its UI.
Why Together these give plugins and hooks a broader, more capable API — access to environment variables, settings, and session usage, plus the ability to draw real interactive terminal UI — while the renamed, more consistent action names and new validation keep that expanded surface from letting a plugin corrupt data it shouldn't touch or send oversized payloads.
Documented inapi/build-with-claude/files
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 since
Anthropic's documentation has since written up env.get, on Test a mod.
* **`mock.env(on, { CI: 'true' })`**: answers `$.env.get` from those variables.plugins/mods/test see the edit
Confirmed since
Anthropic's documentation has since written up fs.list, on Use the mods API.
* **`$.fs.list`**: returns one directory's entries as `{ name, kind, size, isLink }` and isn't recursiveplugins/mods/api see the edit
Confirmed since
Anthropic's documentation has since written up fs.write, on Manage mods for your organization.
Each time another mod is about to load, your mod receives the list that `claude plugin validate` prints, in an event named [`plugin.register`](/docs/en/plugins/mods/reference#other-mods). A mod in `prependPlugins` can read that list and re…plugins/mods/admin see the edit
Confirmed since
Anthropic's documentation has since written up fs.read, on Manage mods for your organization.
* **Deny rules and your managed hooks take precedence.** Where the guard loads, a user's mod can't approve a call that a `deny` rule refuses, whichever settings file holds the rule. A block from a `PreToolUse` hook in managed settings is f…plugins/mods/admin see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up fs.read, on Manage mods for your organization.