Opus 4.7: Korean text garbling in tool_use JSON parameters (AskUserQuestion)

Resolved 💬 4 comments Opened Apr 26, 2026 by dungan24 Closed May 30, 2026

Bug Description

When using claude-opus-4-7 in Claude Code, Korean (한글) text is frequently garbled in tool_use JSON parameters, specifically in AskUserQuestion tool calls. Free-text assistant responses and file write operations (Write/Edit) are completely unaffected.

The garbled characters are valid Unicode Korean syllables but incorrect ones — this is not mojibake or encoding corruption. It appears to be a token-level decoding issue specific to structured JSON output generation.

Environment

  • Claude Code version: 2.1.120
  • Model: claude-opus-4-7
  • Platform: WSL2 (Linux 6.6.x on Windows)
  • Session ID: d1839158-49d4-4d24-8752-28dbfc061e6f

Reproduction

  1. Use claude-opus-4-7 model
  2. Invoke any skill/workflow that calls AskUserQuestion with Korean text options
  3. Observe garbled Korean in the tool call parameters (option labels, headers, descriptions)

The issue occurred during a document-writing brainstorming session with multiple-choice Korean options.

Quantitative Impact

| Category | Count | Garble rate |
|---|---|---|
| AskUserQuestion calls | 16 total | 12 garbled (75%) |
| Total garbled word instances | 32 | across 12 tool calls |
| Free-text assistant turns | 58 | 0 garbled (0%) |
| Write/Edit file outputs | ~20 | 0 garbled (0%) |

Examples

Example 1 — Single syllable substitutions (most common)

# Garbled output:
혁자서도 사업을 처음~끝까지 굴려감
도패민·프로젤 특성
파툖화를 제품로 만드는

# Expected:
혼자서도 사업을 처음~끝까지 굴려감
도메인·프로젝트 특성  
패턴화를 제품으로 만드는

Substitution pattern: 혁→혼, 도패민→도메인, 프로젤→프로젝트, 파툖화→패턴화

Example 2 — Multiple garbles in a single option block

# Garbled output:
opt[2]: 단독 처리 선호 → 위임/협업 서투름
→ '내가 하는 게 빠르다'고 느껴서 혈을 나눠주거나 다른 사람에게 맡기는 게 뚝곳지 않음

# Expected:
→ ... 일을 나눠주거나 다른 사람에게 맡기는 게 쉽지 않음

Garbled: 혈→일, 뚝곳지→쉽지 (completely different syllables)

Example 3 — Header itself garbled

# Garbled:
header: "며머다제"

# Expected (from context):
header: "몰입 조절" or "몰입 다스리기"

Example 4 — Trailing consonant dropped

# Garbled:
클라이언에게 쓰이는
유지보슘2파트

# Expected:
클라이언트에게 쓰이는 (트 dropped)
유지보수2파트 (슘→수)

Example 5 — Completely nonsensical sequences

# Garbled:
애년 안구던 느낌을 줄 수 있음

# Expected (from context):
냉정하다는 느낌을 줄 수 있음

Example 6 — Negotiation/coordination terms

# Garbled:
임원·실무진과 직접 계약·혐상·이행 협의
본사 팀을 설득·조육·인계한 경험

# Expected:
계약·협상·이행 (혐→협)
설득·조율·인계 (조육→조율)

Pattern Analysis

  1. Only affects structured output: Tool call JSON parameters are garbled; free-text responses are clean
  2. Single-syllable substitution: Most errors replace one Korean syllable with a phonetically/structurally adjacent but incorrect one (similar jamo components)
  3. Not encoding-related: All garbled characters are valid Unicode Hangul — the wrong syllable block is selected, not corrupted bytes
  4. Temporal clustering: Worst garbling at 06:53-06:57 UTC (4 consecutive calls, 15+ garbled words), suggesting possible degradation during rapid structured output generation
  5. Inconsistent: Same words rendered correctly in some turns and incorrectly in others

Workaround

Downgrading to claude-opus-4-6 eliminates the issue entirely.

Hypothesis

This appears to be a constrained decoding / structured output sampling issue in Opus 4.7's tool_use JSON generation path for CJK characters. The free-text generation path handles Korean correctly, suggesting the two paths differ in tokenizer behavior or sampling constraints.

View original on GitHub ↗

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