claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Custom agents no longer work in VSCode extension

Open pranavwagh opened this issue 3 months ago • 4 comments

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:

  1. Create a custom agent in ~/.claude/agents/agent-name.md with proper YAML frontmatter
  2. Attempt to use it via the Task tool with subagent_type: "agent-name"
  3. 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.

pranavwagh avatar Oct 08 '25 09:10 pranavwagh

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.

schoblaska avatar Oct 18 '25 17:10 schoblaska

Still happening. Any change?

ragingwind avatar Nov 20 '25 09:11 ragingwind

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.

github-actions[bot] avatar Dec 20 '25 10:12 github-actions[bot]

This is still an issue, and I am highly interested in a fix that would allow me to use agents inside VSCode.

rebelthor avatar Dec 23 '25 09:12 rebelthor