Plugins in the SDK changedagent-sdk/plugins
Nearest release: v2.1.311, published under an hour after 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 26 Oct 2026 18:49 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 26 Oct 2026 19:07 UTC.
Upstream edited
Recorded here
Lines+16added
Lines−0removed
From line
66
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits10to this page, all time
### Add plugins to a running session
The whole hunk
from line 66, old and new numbered
/
from line 66
6666>
6767> The path should point to the plugin's root directory: the parent of `skills/`, `agents/`, `hooks/`, `commands/`, or `.claude-plugin/`.
6868
69### Add plugins to a running session
70
71In the TypeScript SDK, call [`reloadPlugins()`](https://code.claude.com/docs/en/agent-sdk/typescript#load-more-plugin-folders-with-addplugins) on the `Query` object that `query()` returned, and list the plugin directory in that call's `addPlugins` option. Each `addPlugins` entry is a `{ type: "local", path }` object with an absolute `path`. Requires TypeScript Agent SDK v0.3.301 or later.
72
73In this example, `q` is the `Query` object that `query()` returned. The example adds one plugin directory to the running session and, after `reloadPlugins()` returns, prints the path of every plugin in the session:
74
75```typescript theme={null}
76const result = await q.reloadPlugins({
77 addPlugins: [{ type: "local", path: "/home/user/plugins/another-plugin" }]
78});
79
80console.log(result.plugins.map((plugin) => plugin.path));
81```
82
83If the plugin loaded, the printed list includes `/home/user/plugins/another-plugin`. If that path is missing from the list, or `reloadPlugins()` rejects, see [When `reloadPlugins()` doesn't load the `addPlugins` folders](https://code.claude.com/docs/en/agent-sdk/typescript#when-reloadplugins-doesnt-load-the-addplugins-folders) for the causes.
84
6985## Verifying plugin installation
7086
7187When plugins load successfully, they appear in the system initialization message. You can verify that your plugins are available:
No line in this hunk matches that.