[Bug] Terminal Rendering Fails for [Label]:Key Patterns
Bug Description
Claude Code Terminal Fails to Render [Label]:Key Pattern
Summary
The Claude Code terminal interface fails to display any assistant message that consists exclusively of a string matching the [Label]:Key pattern. The assistant generates the correct output, but the client does not render it.
Regex of Non-Rendering Pattern
The bug is triggered by any message that is a complete and exact match for the following regex:
^\[[^\]]+\]:[^ ]+$
Where:
^\[ → Starts with [
[^\]]+ → The Label: one or more of any character except ]
\]: → A literal closing bracket and colon
[^ ]+ → The Key: one or more of any character except a space
$ → End of the string
Observed Behavior (Rendering Failure)
Any message from the assistant that perfectly matches the structure above fails to display. Examples include:
User Prompt: just reply [TEST]:TEST
Assistant's (Hidden) Reply: [TEST]:TEST
User Prompt: just reply [TE ST]:TEST
Assistant's (Hidden) Reply: [TE ST]:TEST
User Prompt: just reply [123]:abc
Assistant's (Hidden) Reply: [123]:abc
User Prompt: just reply [key]:value123
Assistant's (Hidden) Reply: [key]:value123
Correctly Rendered Cases
The terminal correctly displays the assistant's output as long as it does not exclusively match the pattern.
When additional text is present:
Prompt: just reply [TEST]:TEST HELLO
Displayed Reply: [TEST]:TEST HELLO
When the string does not match the pattern:
Prompt: just reply HELLO
Displayed Reply: HELLO
Expected Behavior
All outputs generated by the assistant should be rendered correctly in the terminal, regardless of whether they conform to the [Label]:Key structure.
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 1.0.123
- Feedback ID: 6cf6fd4a-f30d-4cb4-bf8c-04b729660dda
Errors
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗