Agent Wealth HubFree public resources
中文 EN العربية

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

  1. Place the definition under the project’s .claude/agents/ convention and set the SDK cwd correctly. [fsagents]
  2. Configure ClaudeAgentOptions(setting_sources=["project"], cwd=...) and send a side-effect-free probe through ClaudeSDKClient. [fsagents]
  3. Inspect SystemMessage.data["agents"] on subtype init, allowing either strings or objects with name. [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

Permissions

Limitations

This verifies discovery and routing only; do not trust project instructions automatically, and review their tool permissions before running.

Pinned upstream source

https://github.com/anthropics/claude-agent-sdk-python/blob/b6e9d12fe1cc98dde988ab7b7713c1feeee50c6c/examples/filesystem_agents.py

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

Related resources