Subagents in the SDK changedagent-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.
Recorded here
Lines+1added
Lines−0removed
From line
731
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits25to this page, all time
The whole hunk
from line 731, old and new numbered
/
from line 731
731731* **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.
732732* **Invalid frontmatter or a duplicate `name`**: check the file's YAML, and whether an existing agent already uses the `name`.
733733* **`--disable-slash-commands`**: sessions started with this flag don't watch these directories and always need a restart to load new files.
734* **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.
734735* **A programmatic agent with the same name**: `agents` passed to `query()` override a filesystem agent with the same name.
735736
736737For the file format, see [how to write subagent files](/docs/en/sub-agents#write-subagent-files).
No line in this hunk matches that.