Agent discovery does not inherit from parent .claude/agents directories
Description
Claude Code currently only discovers agents in the current project's .claude/agents directory. Agents in parent directory .claude/agents folders are not inherited or discovered.
Expected Behavior
When working in a project (e.g., /Users/username/Dropbox/Teaching/Projects/LECWeb), Claude should discover and make available agents from parent directory .claude/agents folders (e.g., /Users/username/Dropbox/.claude/agents/), similar to how many tools inherit configuration from parent directories.
Current Behavior
Only agents defined in the current project's .claude/agents/ directory are accessible. Parent directory agents are completely ignored, requiring duplication of agent definitions across projects.
Example
Given this directory structure:
/Users/username/Dropbox/
├── .claude/
│ └── agents/
│ ├── canvas-latex-html.md
│ ├── dictation-cleanup.md
│ └── latex-converter.md
└── Teaching/
└── Projects/
└── LECWeb/
└── .claude/
└── agents/
└── sync-deploy.md
When working in LECWeb, only sync-deploy.md is available. The agents in /Dropbox/.claude/agents/ (canvas-latex-html, dictation-cleanup, latex-converter) are not discovered.
Impact
This forces users to either:
- Duplicate agent definitions across projects
- Manually move/copy agent files to each project
- Work around it with symlinks
Agent inheritance from parent directories would enable code reuse and simpler project organization.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗