[BUG] Agent does not follow the correct format when creating sub-agents.
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?
You can ask Claude to create a sub-agent to support the operation of this repository.
However, unless you do this using the specific agent slash command (/agents) Claude will invariably create agents that lack the minimal front matter and which are not recognized by the orchestrator.
What Should Happen?
Claude should have inherent understanding of its own documentation in general (this was addressed in a previous bug report). But in the specific case of sub-agents, it should certainly know the essential front-matter
Allowing for the creation of agents in standard chats would create a more fluid user experience.
Error Messages/Logs
Steps to Reproduce
During a chat with Claude, ask it to create an agent.
In the majority of cases:
- Claude will correctly create the agent configuration within the target directory (
.claude/agents) - The created config will lack frontmatter
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.55
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗