[BUG] Crash when displaying Japanese (multi-byte UTF-8) text in status line

Resolved 💬 3 comments Opened Dec 27, 2025 by shin910 Closed Dec 27, 2025

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?

Claude Code crashes when the status line displays Japanese text. The Rust code attempts to slice a string at a byte index that falls in the middle of a multi-byte UTF-8 character ('回' is 3 bytes, but it tries to slice at byte index 2).

What Should Happen?

Status line should properly handle multi-byte character boundaries when truncating text for display.

Error Messages/Logs

thread '<unnamed>' panicked at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/str/mod.rs:833:21:
  byte index 2 is not a char boundary; it is inside '回' (bytes 0..3) of `回、14日レポート: `
  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

Steps to Reproduce

  1. Start Claude Code in a directory with a project
  2. Have a conversation in Japanese
  3. Execute a task that displays Japanese text in the status/progress line (e.g., text containing "14日レポート" or "回")
  4. When the status line text needs to be truncated for display width, the crash occurs

Claude Model

Opus

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

VS Code integrated terminal

Additional Information

This crash happens repeatedly when working with Japanese text in the conversation. The issue appears to be in the status line rendering code which doesn't account for multi-byte UTF-8 character boundaries when truncating strings to fit the terminal width.

View original on GitHub ↗

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