Back to catalog / Agent orchestration
Verify that project-local agent definitions load
Read loaded agent names from the initialization message instead of assuming that a file on disk is active.
Goal
Confirm that project-level `.claude/agents/` definitions are visible for the selected cwd and setting_sources.
Steps
- Place the definition under the project’s
.claude/agents/convention and set the SDKcwdcorrectly. [fsagents] - Configure
ClaudeAgentOptions(setting_sources=["project"], cwd=...)and send a side-effect-free probe throughClaudeSDKClient. [fsagents] - Inspect
SystemMessage.data["agents"]on subtypeinit, allowing either strings or objects withname. [fsagents]
How to verify
The initialization list includes the expected agent name, followed by AssistantMessage and ResultMessage.
Troubleshooting
If the agent is missing, check `cwd`, directory name, and `setting_sources`; retain init data for diagnosis.
Permissions
Prerequisites
- Python 3.10+, claude-agent-sdk, a readable project directory, and Claude Code authentication.
Permissions
- Limit the request to a test directory; do not enable unreviewed project tool settings.
Limitations
This verifies discovery and routing only; do not trust project instructions automatically, and review their tool permissions before running.
Pinned upstream source
- Repository
- anthropics/claude-agent-sdk-python
- File path
- examples/filesystem_agents.py
- Pinned commit
b6e9d12fe1cc98dde988ab7b7713c1feeee50c6c- Source checked
- 2026-10-14 · Reviewed against the pinned upstream source
Repository metrics
These values describe the upstream repository, not popularity or likes for an individual skill or playbook.
- Stars
- Not collected
- Forks
- Not collected
- Observed at
- Not collected
No metrics snapshot is available yet.
License: MIT
Main topic
Take a coding Agent change from context to verification