[Bug] Subagent Description Parsing Breaks Multi-line and Triple-Hyphen Strings
Bug Description
Issue: Subagent Description Format Limitations
Problem Summary
The description field for subagents in the Task tool currently has two critical formatting limitations that make it difficult to write clear, readable agent descriptions.
Issue 1: No Multi-line String Support
Current behavior: Multi-line strings are not properly supported in subagent descriptions. Attempting to use natural line breaks results in parsing errors or unexpected behavior.
Workaround required: We must manually insert \n escape sequences instead of using natural line breaks, which severely impacts readability and maintainability.
Example of current workaround:
"description": "Line 1\nLine 2\nLine 3"
Desired behavior:
"description": "Line 1
Line 2
Line 3"
Issue 2: Triple Hyphens Truncate Description
Current behavior: When the description contains three consecutive hyphens (---), the description gets truncated at that point. Two hyphens (--) work fine.
Example:
"description": "This is a test --- everything after this is lost"
// Results in: "This is a test "
This is particularly problematic when:
- Using markdown horizontal rules (---)
- Creating visual separators in documentation
- Writing structured documentation with section dividers
Impact
These limitations force us to:
- Write less readable, cramped descriptions
- Avoid using markdown horizontal rules
- Manually escape or work around natural documentation patterns
- Spend extra time formatting descriptions in unnatural ways
Requested Fix
Please add proper multi-line string support and remove the truncation behavior with triple hyphens (---) in subagent descriptions. This would allow natural, readable documentation formatting consistent with standard
markdown and documentation practices.
Environment Info
- Platform: linux
- Terminal: windows-terminal
- Version: 2.0.14
- Feedback ID: d2eabb85-b60b-4f35-8af7-244ae5666e0e
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗