[BUG] CLI crashes when resuming sessions with long Japanese/multibyte character titles

Resolved 💬 4 comments Opened Dec 25, 2025 by mg1986jp Closed Feb 16, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When running claude -r to resume a session, the CLI crashes with a Rust panic if any session in the history has a long title containing Japanese (or other multibyte) characters.

Error message:
thread '' panicked at library/core/src/str/mod.rs:833:21:
byte index 11 is not a char boundary; it is inside ')' (bytes 9..12) of と表示)
fatal runtime error: failed to initiate panic, error 5, aborting
zsh: abort claude -r

Root cause:
The code attempts to truncate session display text at a byte boundary without considering UTF-8 multibyte character boundaries. Japanese characters are 3-4 bytes each, and slicing in the middle of a character causes a panic.

Impact:

  • Users cannot access ANY session via claude -r once a problematic session exists
  • Affects international users (Japanese, Chinese, Korean, emoji users)
  • The entire session list becomes inaccessible

What Should Happen?

The session list should display properly with multibyte characters (Japanese, Chinese, Korean, emoji, etc.) in session titles. If titles need to be truncated for display, the truncation should respect UTF-8 character boundaries to avoid slicing in the middle of multibyte characters.

Users should be able to:

  • View all sessions in the list regardless of character encoding
  • Select and resume any session without crashes

もっとシンプルにするなら:

Session titles with multibyte characters should display safely. If truncation is needed, it should respect UTF-8 character boundaries instead of slicing at arbitrary byte positions.

Error Messages/Logs

thread '<unnamed>' (75929560) panicked at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/str/mod.rs:833:21:
  byte index 11 is not a char boundary; it is inside ')' (bytes 9..12) 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 -r

Steps to Reproduce

  1. Start Claude Code: claude
  2. Enter a long message containing Japanese text (e.g., "~/claude/README.mdはmainブランチにはないが、feature/initial-setupブランチで整備しきってからpushするという長いメッセージ...")
  3. Exit the session
  4. Run claude -r to resume a session
  5. CLI crashes with panic about byte boundary

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.76 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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