Rust panic on Korean (UTF-8) string processing

Resolved 💬 3 comments Opened Dec 18, 2025 by htkyung84 Closed Dec 21, 2025

Claude Code crashes with panic when processing Korean characters.

Version: 2.0.72
OS: Linux 6.14.0-37-generic

Error:

thread '<unnamed>' panicked at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/str/mod.rs:833:21:
byte index 6 is not a char boundary; it is inside '록' (bytes 4..7) of ` 등록`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5, aborting

Steps to reproduce:

  • Use Claude Code with Korean language input/output
  • Error occurs randomly during normal operation (TodoWrite, status display, text rendering, etc.)
  • The crash happens when Rust code tries to slice a UTF-8 string at a byte index that falls in the middle of a multi-byte Korean character

Expected behavior:
Handle UTF-8 multi-byte characters correctly by using char boundaries instead of byte indices when slicing strings.

Actual behavior:
Panic and crash (IOT instruction / core dumped)

Additional context:
Korean characters use 3 bytes each in UTF-8. The error message shows the code tried to slice at byte index 6, which is inside the character '록' (bytes 4-6), not at a valid character boundary.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗