[BUG] Glob tool incorrectly inserts redundant spaces for filenames with Chinese, numbers, or hyphens (-) (macOS standalone)
Resolved 💬 2 comments Opened Apr 14, 2026 by nigelming Closed May 23, 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 Code Information
- Installation type: Standalone binary (non-npm, macOS)
- Version: 2.1.104 (Claude Code)
- OS: macOS
Describe the bug
The built-in Glob tool incorrectly inserts unnecessary redundant spaces when displaying filenames that contain:
- Chinese characters
- Numbers
- Hyphens (-)
This only happens in the display output; file matching works correctly. The actual filenames on disk do NOT have these extra spaces.
What Should Happen?
To Reproduce
- Create files like these:
原始数据/2026年3月指标.xlsx原始数据/报表装维-202603.xlsx数据-2025-测试.xlsx
- Run:
````
claude -p "Glob **/*.xlsx"
Error Messages/Logs
**Expected behavior**
File paths should be displayed **exactly as they are stored on disk**, without extra spaces.
**Actual behavior**
The output automatically adds wrong spaces:
1. `原始数据/2026 年 3 月指标.xlsx`
2. `原始数据/报表装维 - 202603.xlsx`
3. `数据 - 2025 - 测试.xlsx`
Steps to Reproduce
Verification
- Running
lsshows real filenames do NOT contain these spaces. - Pure English filenames work correctly.
- This is a text rendering / tokenization bug in CJK & symbol handling.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.104
Platform
Other
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗