Plugin subagents: `model:` frontmatter in a plugin's agents/*.md is ignored (project-level agents honor it)
Summary
Subagents shipped inside a plugin (<plugin>/agents/<name>.md) do not honor the model: frontmatter key. The same file placed under the project's .claude/agents/ does honor it, and passing model explicitly on the Agent tool call also works. So a plugin author cannot pin a cheaper/stronger model per agent; every plugin agent runs on the session's main model unless the caller remembers to pass model each time.
Repro (Claude Code CLI, Linux/WSL2, 2026-08-25)
- Install a plugin from a marketplace whose
agents/implementer.mdhas frontmattermodel: claude-sonnet-5(orsonnet). CLAUDE_CODE_SUBAGENT_MODELunset.- Dispatch it:
Agent({subagent_type: "<plugin>:implementer", prompt: "print the model id you are running on"})without amodelparameter. - Observed: the subagent reports the session's main model (Fable 5 in our case), not sonnet.
- Copy the same agent file to
.claude/agents/implementer.mdin the project and dispatchsubagent_type: "implementer": the subagent reports sonnet. Passingmodel: "sonnet"on the Agent call also yields sonnet for the plugin agent.
Expected
A plugin agent's model: frontmatter should apply exactly as it does for project-level agents (docs describe the frontmatter as the per-agent model setting).
Impact
Cost and behaviour drift: plugins that pin implementer/verifier roles to a mid-tier model silently run on the top-tier model instead. Workaround in use: project overlays in .claude/agents/ and always passing model explicitly.
Environment
Claude Code CLI on WSL2 Linux 5.15; plugin installed via claude plugin install <name>@<marketplace> (git-clone marketplace); model ids observed: claude-fable-5 (session), claude-sonnet-5 (pinned target).