Rust panic: byte index not a char boundary when processing emoji characters

Resolved 💬 3 comments Opened Jan 10, 2026 by NoiseMeld Closed Feb 25, 2026

Description

Claude Code CLI crashes with a Rust panic when processing strings containing emoji characters (specifically ✅).

Error Message

thread '<unnamed>' (426305) 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 `✅`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5, aborting
[1]    44239 abort      claude --dangerously-skip-permissions

Context

The crash occurred while Claude was about to write to a markdown file (tasks.md) that would contain checkbox markers with ✅ emojis to indicate completed tasks.

Steps to Reproduce

  1. Have Claude Code write/edit a file containing multi-byte UTF-8 characters like ✅
  2. The CLI crashes with the above panic

Environment

  • OS: macOS (Darwin 24.6.0)
  • Claude Code: Latest version
  • Date: 2026-01-09

Root Cause

The Rust code is attempting to index into a UTF-8 string at a byte position (2) that falls in the middle of a multi-byte character (✅ is 3 bytes). This is a classic UTF-8 boundary handling bug.

Workaround

Avoid using emoji characters in files being edited, or use ASCII alternatives like [x] instead of ✅.

View original on GitHub ↗

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