Preflight Checklist
Problem Statement
Previously raised in #16836 (auto-closed and locked).
Agents are managed globally in ~/.claude and apply to all projects. This causes performance warnings when the cumulative agent descriptions exceed ~15k tokens, even though many agents are only relevant to specific projects.
A developer working across multiple domains (mobile, infrastructure, documentation, blockchain, AI) accumulates 200+ agents globally. A documentation repo doesn't need Kubernetes or blockchain agents. An embedded systems project doesn't need React or Django agents. But today the only option is to delete agents entirely, removing them from all projects.
Proposed Solution
Add per-project agent configuration, similar to how CLAUDE.md provides project-specific instructions.
Option A: Project-level .claude/agents.json
{
"mode": "whitelist",
"agents": ["brain-dump-organizer", "session-journalist", "content-writer"]
}
Option B: Setting in .claude/settings.json (project-level)
{
"agents": {
"mode": "blacklist",
"list": ["mobile-developer", "kubernetes-specialist", "blockchain-developer"]
}
}
Either approach:
- Only loads relevant agents per project, reducing token overhead
- Falls back to global configuration if no project config exists
- No breaking changes
Alternative Solutions
Current workarounds:
- Accept performance warnings (soft limit, not blocking)
- Manually delete/reinstall agents when switching project types
- Maintain minimal global agent set (limiting capabilities in specialized repos)
None of these are satisfactory for users with large agent libraries working across diverse projects.
Priority
Medium - Would be very helpful
Feature Category
Performance and speed
Use Case Example
- Developer has 220+ agents across categories (DevOps, mobile, data, content, security, etc.)
- Opens a documentation-only repository
- Claude Code loads all 220 agent descriptions (~15k+ tokens), triggering performance warning
- With per-project config: only 5-10 relevant agents load, no warning, faster context
- Switching to an infrastructure repo loads a different agent subset automatically
Additional Context
Preflight Checklist
Problem Statement
Previously raised in #16836 (auto-closed and locked).
Agents are managed globally in
~/.claudeand apply to all projects. This causes performance warnings when the cumulative agent descriptions exceed ~15k tokens, even though many agents are only relevant to specific projects.A developer working across multiple domains (mobile, infrastructure, documentation, blockchain, AI) accumulates 200+ agents globally. A documentation repo doesn't need Kubernetes or blockchain agents. An embedded systems project doesn't need React or Django agents. But today the only option is to delete agents entirely, removing them from all projects.
Proposed Solution
Add per-project agent configuration, similar to how
CLAUDE.mdprovides project-specific instructions.Option A: Project-level
.claude/agents.json{ "mode": "whitelist", "agents": ["brain-dump-organizer", "session-journalist", "content-writer"] }Option B: Setting in
.claude/settings.json(project-level){ "agents": { "mode": "blacklist", "list": ["mobile-developer", "kubernetes-specialist", "blockchain-developer"] } }Either approach:
Alternative Solutions
Current workarounds:
None of these are satisfactory for users with large agent libraries working across diverse projects.
Priority
Medium - Would be very helpful
Feature Category
Performance and speed
Use Case Example
Additional Context
.claude/settings.jsonper-project override mechanism could be extended naturally to support this