-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
Labels
area:toolsbugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOSIssue specifically occurs on macOS
Description
Preflight Checklist
- I have searched existing issues and this hasn't been reported yet
- This is a single bug report (please file separate reports for different bugs)
- I am using the latest version of Claude Code
What's Wrong?
Description
Claude Code CLI crashes when editing strings containing Korean characters.
Error
thread '' panicked at .../library/core/src/str/mod.rs:833:21:
byte index 9 is not a char boundary; it is inside '의' (bytes 7..10)
fatal runtime error: failed to initiate panic, error 5, aborting
Environment
- Claude Code: v2.0.76
- OS: macOS Darwin 25.1.0
Root Cause
Rust code uses byte indices instead of character indices when slicing UTF-8 strings. Korean characters are 3 bytes each.
Workaround
Use Read → Write instead of Edit for files with non-ASCII characters.
What Should Happen?
The Edit tool should correctly handle multi-byte UTF-8 characters (Korean, Japanese, Chinese, emoji, etc.) without crashing.
Error Messages/Logs
thread '<unnamed>' panicked at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/str/mod.rs:833:21:
byte index 9 is not a char boundary; it is inside '의' (bytes 7..10) of ` 다음의 방법으로 고지합니다:`
fatal runtime error: failed to initiate panic, error 5, abortingSteps to Reproduce
- Open a file containing Korean text (e.g., TSX file with Korean strings)
- Use Edit tool to replace a short Korean string like "다음의 방법으로"
- CLI crashes with "byte index is not a char boundary" panic
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
2.0.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
No response
Metadata
Metadata
Assignees
Labels
area:toolsbugSomething isn't workingSomething isn't workinghas reproHas detailed reproduction stepsHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOSIssue specifically occurs on macOS