One change
Subagents in the SDK
agent-sdk/subagents
Nearest release: v2.1.234, published an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
agent-sdk/subagents Changed · +1 / -0 lines
from line 731
* **New `agents` directory**: the watcher covers only directories that existed when the session started, so the first file in a new directory needs a session restart. This is the most common cause. * **Invalid frontmatter or a duplicate `name`**: check the file's YAML, and whether an existing agent already uses the `name`. * **`--disable-slash-commands`**: sessions started with this flag don't watch these directories and always need a restart to load new files. +* **A file under an added directory**: Claude Code loads `.claude/agents/` from directories added with the `add_dirs` (Python) or `additionalDirectories` (TypeScript) option, or the CLI's `--add-dir` or `/add-dir`, but doesn't watch them, so a new or edited file there needs a session restart. * **A programmatic agent with the same name**: `agents` passed to `query()` override a filesystem agent with the same name. For the file format, see [how to write subagent files](/docs/en/sub-agents#write-subagent-files).