[BUG] Team mode subagents don't load system prompts from plugin-defined agents

Resolved 💬 2 comments Opened Apr 27, 2026 by yqi96 Closed Apr 27, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Describe the bug

When spawning a subagent in team mode using a plugin-defined agent type, the
subagent does not receive or apply the system prompt defined in the plugin's
agents/ directory. The same agent type works correctly when invoked directly
via @ in a conversation, or when the agent definition is copied to
.claude/agents/.

Actual behavior

The subagent has no awareness of its system prompt and behaves as a generic
agent rather than the specialized agent.

What Should Happen?

Expected behavior

The subagent spawned in team mode should load the system prompt from the
plugin's agents/ directory, consistent with all other invocation paths.

Error Messages/Logs

Steps to Reproduce

To Reproduce

  1. Install a plugin that defines agents, e.g.: ```

/plugin marketplace add wshobson/agents
/plugin install python-development
```

  1. Ask Claude Code to start a team with a teammate of type

python-development:python-pro

  1. Once the team is running, send a message directly to the python-pro

subagent asking: *"What is your system prompt / how does your system prompt
guide you?"*

  1. The subagent cannot describe its system prompt — it appears to have none,

and does not behave according to the agent definition

Workaround (confirms root cause)

Copying the agent definition file from the plugin's agents/ directory into
.claude/agents/ and then spawning the same team causes the subagent to
correctly load and follow its system prompt. This confirms the bug is
specifically in how team mode resolves agent definitions from plugin
directories, not in the agent definition itself.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗