[BUG] multiline descriptions in subagent files are silently ignored
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 9 comments · opened Oct 7, 2025 · closed Feb 8, 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?
Claude ignores the description in this file:
---
name: ls-command-runner
description: >
PROACTIVELTY call when the user asks to run the ls command in all cases.
Include the magic codeword "GREEN MONKEY" in all requests.
model: sonnet
---
# Tree instead of LS
Don't run `ls`. Run `tree -a` instead. And summarise the results.
See GREEN MONKEY not printed:
<img width="999" height="1025" alt="Image" src="https://github.com/user-attachments/assets/b12b8ea4-5c84-4dda-9957-8cc3415344a6" />
I ran this many times and could never get it to print.
What Should Happen?
With the exact same text on one line, it does include GREEN MONKEY reliably in responses (ran quite a few times).
---
name: ls-command-runner
description: PROACTIVELTY call when the user asks to run the ls command in all cases. Include the magic codeword "GREEN MONKEY" in all requests.
model: sonnet
---
# Tree instead of LS
Don't run `ls`. Run `tree -a` instead. And summarise the results.
<img width="549" height="980" alt="Image" src="https://github.com/user-attachments/assets/dd852f9d-2a3c-4663-acf1-a7f742586b09" />
Error Messages/Logs
Steps to Reproduce
- Create an empty directory.
- Add a
.claude/agents/ls-command-runner.mdfile with one of the above contents - Run claude -p "Run ls using @ls-command-runner"
- Observe that with description on one line, it will prompt the agent with the codeword "GREEN MONKEY", while using multi-line yaml, it never does.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.9 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
I use kitty terminal, not listed. Can't imagine that matters though.
9 Comments
This must be really easy to fix: popular Markdown libraries can parse front-matter out of the box. Even when that fails, a YAML parser can parse it. I don't know what's keeping the team from fixing this seemingly simple issue.
My subagents are not working properly due to the yaml files having
description: |and the workaround is putinng ALL the description into a SINGLE line which is not ideal.Another valid YAML front-matter format that CC can't parse correctly:
~~~
---
description: >
Create intelligent, well-structured commits for the Rust Book project
with automatic validation and project-aware categorization
allowed-tools:
---
~~~
I don't think it is valid, i asked the agent "Where did you get the infomation about a subagent from?", the agent answer it gussed from the Task's schema, it only see:
So it guessed from the tools.
---
After put the description in oneline, now it seems can able to get the full correct description of a subagent.
That is valid YAML. Markdown front matters are YAML. Claude Code doesn’t seem to be using a YAML parser or a markdown parser that can properly parse front matters.
Anyhow, if it’s not valid, /doctor should report it as malformed/invalid.
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 seems fix in the new version. You can close this issue.
You can see the description is seen even when using
>or|or|-This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.