Fatal panic: Unicode boundary error with hourglass emoji (⏳)
Description
Claude Code crashed with a fatal panic due to improper UTF-8 string slicing when handling the hourglass emoji (⏳).
Error Output
thread '<unnamed>' (24243) 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] 2455 abort claude --strict-mcp-config --mcp-config ~/.claude/mcp-profiles/dev.json
Environment
- Claude Code version: 2.0.76
- Platform: macOS (Darwin 25.2.0)
- MCP config:
~/.claude/mcp-profiles/dev.json - Command:
claude --strict-mcp-config --mcp-config ~/.claude/mcp-profiles/dev.json
Context
The crash occurred while Claude was autonomously working on a project. The user was not actively involved at the time of the crash.
Root Cause
The error indicates that Rust code attempted to slice a UTF-8 string at byte index 2, which falls inside the multi-byte emoji character '⏳'. This emoji is 3 bytes in UTF-8 encoding (bytes 0..3), so slicing at byte 2 is invalid and violates character boundaries.
Expected Behavior
String operations should respect UTF-8 character boundaries when slicing/indexing strings containing multi-byte Unicode characters.
Additional Notes
This appears to be a Unicode handling bug in Claude Code's Rust codebase, likely in code that processes or displays status indicators or emoji.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗