[BUG] Rust panic when parsing CLAUDE.md with Korean (multi-byte UTF-8) characters
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?
Bug Description
Claude Code crashes with a Rust panic during init when CLAUDE.md contains Korean (or other multi-byte UTF-8) characters.
## Error Message
thread '' panicked at /rustc/.../library/core/src/str/mod.rs:833:21:
byte index 10 is not a char boundary; it is inside '와' (bytes 8..11) of ChatGPT와 Gemini에 보내는 크롬 익스텐션(Manifest v3)
## Steps to Reproduce
- Create a CLAUDE.md file with Korean text (or other multi-byte UTF-8 characters)
- Run
claudeto init in that directory - Claude Code crashes immediately
## Expected Behavior
CLAUDE.md with non-ASCII UTF-8 characters should be parsed correctly without crashing.
## Root Cause
The Rust code is slicing a string at a byte offset (10) that falls in the middle of a multi-byte UTF-8 character ('와' spans bytes 8-11). String slicing in Rust must occur at valid character boundaries.
## Workaround
Temporarily rename or remove CLAUDE.md before running init, then restore it afterward.
## Environment
- OS: Windows
- Claude Code version: (latest)
What Should Happen?
CLAUDE.md files containing Korean (or other multi-byte UTF-8) characters should be parsed correctly during claude init without crashing.
Error Messages/Logs
Steps to Reproduce
- Create a
CLAUDE.mdfile with Korean (multi-byte UTF-8) content, for example:
```markdown
# CLAUDE.md
Project Name - ChatGPT와 Gemini에 보내는 크롬 익스텐션
- Run claude to initialize in that directory
- Claude Code crashes with Rust panic:
thread '<unnamed>' panicked at .../library/core/src/str/mod.rs:833:21:
byte index 10 is not a char boundary; it is inside '와' (bytes 8..11)
Note: The bug occurs when Rust code slices a UTF-8 string at a byte offset that falls in the middle of a multi-byte character (Korean characters are 3 bytes each in UTF-8).
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.76 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗