Panic: byte index error when rendering emoji (🏠) in diagram output

Resolved πŸ’¬ 3 comments Opened Jan 3, 2026 by jemulpoclub Closed Jan 6, 2026

Bug Description

Claude Code crashes with a Rust panic when rendering output containing emoji characters (specifically 🏠) during diagram creation.

Error Message

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

Steps to Reproduce

  1. Use Claude Code to create a diagram
  2. Include the house emoji (🏠) in the output
  3. Claude Code crashes when rendering the output

Analysis

The Rust code is attempting to slice a UTF-8 string at byte index 3, but the 🏠 emoji occupies bytes 0-3 (4 bytes total). This is a classic UTF-8 boundary error where the code assumes single-byte characters.

Environment

  • OS: Rocky Linux 9
  • Platform: Linux 5.14.0-605.el9.x86_64

Expected Behavior

Claude Code should properly handle multi-byte UTF-8 characters (emojis) without crashing.

Workaround

Avoid using emojis in diagrams until fixed.

View original on GitHub β†—

This issue has 3 comments on GitHub. Read the full discussion on GitHub β†—