Plugin subagents: `model:` frontmatter in a plugin's agents/*.md is ignored (project-level agents honor it)

Status Open
Maintainer reply None cached
Activity 0 comments · opened Aug 26, 2026

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)

  1. Install a plugin from a marketplace whose agents/implementer.md has frontmatter model: claude-sonnet-5 (or sonnet).
  2. CLAUDE_CODE_SUBAGENT_MODEL unset.
  3. Dispatch it: Agent({subagent_type: "<plugin>:implementer", prompt: "print the model id you are running on"}) without a model parameter.
  4. Observed: the subagent reports the session's main model (Fable 5 in our case), not sonnet.
  5. Copy the same agent file to .claude/agents/implementer.md in the project and dispatch subagent_type: "implementer": the subagent reports sonnet. Passing model: "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).

View original on GitHub ↗