Panic on UTF-8 Korean character boundary when editing YAML description

Resolved 💬 3 comments Opened Dec 23, 2025 by cafe24-mcpark Closed Feb 14, 2026

Bug Description

When editing a YAML frontmatter description field containing Korean text, Claude Code panics with a UTF-8 byte boundary error.

Version

  • Claude Code: 2.0.76
  • OS: macOS Darwin 24.6.0

Error Message

thread '<unnamed>' (4457369) panicked at /rustc/ed61e7d7e242494fb7057f2657300d9e77bb4fcb/library/core/src/str/mod.rs:833:21:
byte index 120 is not a char boundary; it is inside '구' (bytes 118..121) of `시판, SEO), libLog 로깅 시스템, Admin Menu 아키텍처, 언어셋 패키지 버전 관리, Milkp 디버깅 도구, PHPUnit 테스트 패턴(p() request 키, util() Object Pool, 디버깅) 등 EC 개발에 필수적인 인프라 `
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5, aborting

Steps to Reproduce

  1. Create/edit a SKILL.md file with YAML frontmatter
  2. The description field contains long Korean text (multibyte UTF-8 characters)
  3. Use Claude to edit/append text to the description field
  4. When the diff confirmation dialog appears, the application crashes

Expected Behavior

No crash. The application should properly handle UTF-8 multibyte characters when calculating string boundaries for display.

Context

The crash occurs during the "Save file to continue" confirmation step. It appears the code is slicing the string at a byte index that falls in the middle of a Korean character ('구' which spans bytes 118-121).

Workaround

Editing the file manually in VS Code works. The issue only occurs when Claude Code tries to display the diff.

View original on GitHub ↗

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