[Bug] Plugin manifest 'agents' field validation rejects valid path with .claude prefix
Bug Description
Plugin manifest validation rejects "agents": "./.claude/agents" with the unhelpful error message "Validation errors: agents: Invalid input". The path is valid and the directory exists, but the validator doesn't accept it.
The /plugin UI shows the error on the Errors tab but provides no guidance on what format is expected.
Version
Claude Code 2.1.92, Windows 11
Steps to Reproduce
- Create a plugin with an
agentsfield pointing to a.claude/subdirectory:
{
"name": "my-plugin",
"version": "1.0.1",
"skills": "./skills",
"commands": "./commands",
"agents": "./.claude/agents"
}
- Place agent
.mdfiles in.claude/agents/directory. - Install the plugin via marketplace.
- Open
/plugin→ Errors tab.
Expected Behavior
- Plugin loads successfully since the path is valid and the directory/files exist
- OR: error message explains the expected format (e.g., "agents must be a string path not starting with
.claude" or "agents must be an array of paths")
Actual Behavior
- Error tab shows:
Plugin my-plugin has an invalid manifest file at <path>. Validation errors: agents: Invalid input - No indication of what format is valid
- The plugin's agents are not loaded
Workaround
Move the agents directory from .claude/agents/ to ./agents/ and update the manifest to "agents": "./agents". This resolves the validation error.
Notes
The plugin-dev manifest reference shows agents can be a string ("./agents") or array (["./agents", "./specialized-agents"]). The docs don't mention any restriction on .claude/ prefixed paths. If this is intentional (e.g., .claude/ is reserved), the error message should say so.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗