[BUG] Panic on UTF-8 char boundary in Japanese text with HTML tags

Resolved 💬 2 comments Opened Jan 13, 2026 by munyamunya Closed Feb 27, 2026

Description

Claude Code crashes with a Rust panic when processing Japanese text containing HTML tags.

Error Message

thread '<unnamed>' panicked at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/str/mod.rs:833:21:
byte index 20 is not a char boundary; it is inside 'ト' (bytes 18..21) of `合宿・イベント</h1>`
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5, aborting

Environment

  • OS: macOS (Darwin 24.3.0)
  • Claude Code version: Latest

Context

The crash occurred while working with a Japanese website project (Next.js). The string 合宿・イベント</h1> contains katakana characters where the byte index calculation incorrectly lands inside a multi-byte character.

Related Issues

  • #14405
  • #15768

View original on GitHub ↗

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