Panic when resuming conversation with Korean characters in todo list
Description
Claude Code panics when trying to resume a conversation (claude -c) that contains Korean (multi-byte UTF-8) characters in the todo list.
Error Message
thread '<unnamed>' (15652) panicked at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/str/mod.rs:833:21:
byte index 5 is not a char boundary; it is inside '료' (bytes 3..6) of `완료 `
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5, aborting
zsh: abort claude -c
Root Cause
The code is attempting to slice a Korean string (완료 meaning "completed") at byte index 5, but this falls in the middle of the character 료 (which occupies bytes 3-6 in UTF-8). Korean characters are 3 bytes each in UTF-8, so byte-based string slicing causes this panic.
Steps to Reproduce
- Start a Claude Code session
- Use TodoWrite tool with Korean text (e.g., status or content containing
완료,진행중, etc.) - Exit the session
- Try to resume with
claude -c - Application panics
Environment
- OS: macOS (Darwin 24.6.0)
- Claude Code: Latest version via Homebrew
- Shell: zsh
Expected Behavior
Claude Code should properly handle multi-byte UTF-8 characters (Korean, Chinese, Japanese, emoji, etc.) when storing and resuming conversations.
Suggested Fix
Use character-boundary-aware string operations instead of raw byte indexing. In Rust, use .chars() iterator or ensure slicing occurs at valid UTF-8 boundaries.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗