[BUG] Custom agents no longer work in VSCode extension
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?
Description:
Custom agents defined in ~/.claude/agents/ worked in previous versions but are no longer recognized by the VSCode extension, causing a regression in functionality.
What Should Happen?
Expected Behavior:
Custom agents in ~/.claude/agents/ (global) and .claude/agents/ (project-specific) should be loaded and available for use, as documented in the Claude Code documentation.
Actual Behavior:
Only built-in agents (general-purpose, statusline-setup, output-style-setup) are recognized. Custom agents are completely ignored.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce:
- Create a custom agent in
~/.claude/agents/agent-name.mdwith proper YAML frontmatter - Attempt to use it via the Task tool with
subagent_type: "agent-name" - Receive error: "Agent type 'agent-name' not found. Available agents: general-purpose, statusline-setup, output-style-setup"
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
No response
Claude Code Version
2.0.8 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Impact:
- Users who defined custom agents for workflows can no longer use them in VSCode extension
- Forces users to switch to CLI version to access custom agents
- Breaking change with no migration path or notification to users
- Documentation describes feature that doesn't work in VSCode extension
Environment:
- VSCode Extension (latest version)
- Windows 11
- Custom agent exists at:
C:\Users\[user]\.claude\agents\agent-protocol-enforcer.md
Additional Context: This appears to be a regression or incomplete feature parity between CLI and VSCode extension. The documentation clearly describes custom agents as a supported feature, but they don't work in the VSCode extension.
In VS Code, Claude tries to execute this:
{
"description": "Research conflict generation",
"prompt": "I need to develop a prompt for generating dramatic conflicts between characters...",
"subagent_type": "researcher"
}
But gets the error
Agent type 'researcher' not found. Available agents: general-purpose, statusline-setup, output-style-setup
In the Claude Code CLI, the researcher agent appears under /agents and Claude can invoke it when prompted.
Still happening. Any change?
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This is still an issue, and I am highly interested in a fix that would allow me to use agents inside VSCode.