Use the mods API changedplugins/mods/api
Nearest release: v2.1.296, published 23 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 10 Oct 2026 16:33 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 10 Oct 2026 16:37 UTC.
Upstream edited
Recorded here
Lines+4added
Lines−3removed
From line
269
where the diff opens
First seen
1 Oct 2026
this site's first read of the page
Recorded edits12to this page, all time
The whole hunk
from line 269, old and new numbered
/
from line 269
269269| `$.session` | `messages()` returns the transcript as a list of `{ role, text, toolUses }`. Also the working directory, model, and more. [`usage()`](/docs/en/plugins/mods/reference#mods-api-methods) returns context window use and plan limits. |
270270| `$.mcp` | `call` a tool on a connected MCP server |
271271
272Files and processes have a few rules of their own:
272Files, processes, and requests have a few rules of their own:
273273
274* **Paths**: a relative path resolves against the session's working directory
274* **Paths**: a relative path resolves against the working directory of the session, or of the subagent whose event the hook is handling
275275* **`$.fs.list`**: returns one directory's entries as `{ name, kind, size, isLink }` and isn't recursive
276276* **`$.process.run`**: takes an argument list and uses no shell. It resolves to `{ exitCode, stdout, stderr }` whatever the exit code. It rejects if the program can't start or is still running at the timeout, which is 30 seconds by default, so wrap it in `try` and `catch`.
277* **`$.http.fetch`**: follows up to five redirects. On a redirect to a different origin, it keeps only the `accept`, `accept-language`, `content-type`, and `user-agent` request headers you set and drops the rest, so a request that depends on another header, such as `Authorization`, can fail after that redirect. The [limits](/docs/en/plugins/mods/reference#limits) give its timeout and body sizes.
277278
278279Every one of these calls is itself an event, named for its namespace and method without the `$.`, such as `fs.read` for `$.fs.read`. A mod [earlier in the chain](/docs/en/plugins/mods/events#the-order-mods-run-in) can observe, rewrite, or refuse your call, which is how an organization restricts what mods reach.
279280
No line in this hunk matches that.