Panic on Korean (UTF-8 multi-byte) characters in todo/task description
Description
Claude Code CLI crashes with a Rust panic when processing Korean characters in task descriptions or todo items.
Error Message
thread '<unnamed>' (7574024) panicked at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/str/mod.rs:833:21:
byte index 12 is not a char boundary; it is inside '가' (bytes 10..13) of `날짜 추가 (기본 파일도 함께 생성)`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5, aborting
[1] 93452 abort claude -c
Root Cause
The code is attempting to slice a UTF-8 string at byte index 12, which falls in the middle of the Korean character '가' (bytes 10-13). Korean characters are 3 bytes in UTF-8, and slicing at a non-character boundary causes a panic.
Steps to Reproduce
- Use Claude Code CLI
- Create a todo item or task with Korean text (e.g.,
날짜 추가 (기본 파일도 함께 생성)) - The CLI crashes with the above panic
Expected Behavior
The CLI should properly handle UTF-8 multi-byte characters (Korean, Chinese, Japanese, emoji, etc.) when truncating or processing strings.
Environment
- Platform: macOS (Darwin 25.1.0)
- Claude Code CLI version: latest
Suggested Fix
Use character-boundary-aware string slicing instead of byte-based slicing. In Rust, this can be done using .char_indices() or the unicode-segmentation crate to find proper character boundaries before truncating.
🤖 Generated with Claude Code
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗