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
- Use Claude Code to create a diagram
- Include the house emoji (π ) in the output
- 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub β