claude-code - 💡(How to fix) Fix [BUG] Team mode subagents don't load system prompts from plugin-defined agents [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53796Fetched 2026-04-28 06:47:05
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×5closed ×1commented ×1

Error Message

Error Messages/Logs

Root Cause

Workaround (confirms root cause)

Fix Action

Fix / Workaround

Workaround (confirms root cause)

Code Example



---

/plugin marketplace add wshobson/agents
   /plugin install python-development
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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
  2. Ask Claude Code to start a team with a teammate of type python-development:python-pro
  3. 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?"
  4. 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

extent analysis

TL;DR

The subagent in team mode may not be loading the system prompt from the plugin's directory due to a resolution issue, which can be temporarily worked around by copying the agent definition to .claude/agents/.

Guidance

  • Verify that the agent definition file exists in the plugin's agents/ directory and that the file is correctly formatted.
  • Check the plugin installation and ensure that the python-development plugin is correctly installed and enabled.
  • Investigate the team mode's agent resolution logic to determine why it's not loading the system prompt from the plugin's directory.
  • Consider modifying the plugin to include a fallback mechanism for loading agent definitions in team mode.

Example

No code snippet is provided as the issue does not imply a specific code change.

Notes

The root cause of the issue is unclear, but it appears to be related to how team mode resolves agent definitions from plugin directories. The workaround suggests that the issue is not with the agent definition itself, but rather with how it's being loaded.

Recommendation

Apply workaround: Copy the agent definition file from the plugin's agents/ directory to .claude/agents/ to ensure the subagent loads the correct system prompt. This workaround confirms the root cause and provides a temporary solution until the underlying issue is resolved.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Team mode subagents don't load system prompts from plugin-defined agents [1 comments, 2 participants]