`claude plugin details` reports `Agents (0)` when plugin.json lists agents by explicit file path
Summary
claude plugin details <plugin> prints Agents (0) for a plugin whose plugin.json declares its agents as
an explicit array of file paths, even though those agents load and dispatch normally. The same agent file,
found by default auto-discovery (no agents key), is counted. Since the /agents wizard was removed,details is the CLI's only inventory of a plugin's agents, so the false zero reads as a packaging failure.
Environment
- Claude Code 2.1.291, macOS 26 (Darwin 25.6.0)
Related (same count-only class, for skills): #81551
Minimal reproduction
Two plugins in one local marketplace, each with one identical agents/probe-agent.md:
auto/.claude-plugin/plugin.json {"name":"auto","version":"0.0.1"}
explicit/.claude-plugin/plugin.json {"name":"explicit","version":"0.0.1","agents":["./agents/probe-agent.md"]}
claude plugin marketplace add <dir>
claude plugin install auto@flp175-probe --scope project
claude plugin install explicit@flp175-probe --scope project
claude plugin details auto@flp175-probe → Agents (1) probe-agent
claude plugin details explicit@flp175-probe → Agents (0)
Real-world case
A published plugin declares 16 agents as explicit ./agents/*.md paths (a directory entry is rejected by
the installer, which is why the paths are explicit). details prints Agents (0) on 2.1.291. A Claude Code
session resolves all 16 for the Agent tool, and a Cowork session lists the same 16.
Expected
details counts agents declared through the agents array, the same set the session loads.