[BUG] Korean text with certain trailing characters gets corrupted to "[Image #N]" format when clipboard contains image

Resolved 💬 4 comments Opened Aug 10, 2025 by devstefancho Closed Jan 3, 2026

Environment

  • Platform (select one):
  • [x] Claude Code CLI
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.72
  • Operating System: <!-- e.g. macOS 14.3, Windows 11, Ubuntu 22.04 -->
  • Terminal: <!-- e.g. iTerm2, Terminal App -->

Bug Description

Korean text followed by specific characters (comma, numbers, period) gets unexpectedly converted to "[Image #N]" format during text input or processing in Claude Code CLI. This issue only occurs when there is an image present in the clipboard.

https://github.com/user-attachments/assets/328da3b9-cccf-49e6-b6e6-60b2de5a98c1

Steps to Reproduce

  1. Copy an image to clipboard (e.g., screenshot or image file)
  2. Type Korean text followed by any of these characters:
  • Comma: 안녕, → becomes 안[Image #N]
  • Numbers: 안녕0 → becomes 안[Image #N]
  • Period: 안녕. → becomes 안[Image #N]
  • Numbers: 안녕1 → becomes 안[Image #N]

Expected Behavior

Korean text with trailing punctuation or numbers should remain unchanged regardless of clipboard contents:

  • Input: 안녕, → Expected: 안녕,
  • Input: 안녕0 → Expected: 안녕0
  • Input: 안녕. → Expected: 안녕.
  • Input: 안녕1 → Expected: 안녕1

Actual Behavior

When clipboard contains an image, Korean text gets partially replaced with image placeholder syntax:

  • 안녕,안[Image #N]
  • 안녕0안[Image #N]
  • 안녕.안[Image #N]
  • 안녕1안[Image #N]

Additional Context

  • This issue only manifests when there is an image in the clipboard
  • The corruption consistently replaces the last Korean character + trailing character with image reference syntax
  • Suggests the CLI is incorrectly detecting clipboard image content and applying image insertion logic to Korean text + punctuation combinations
  • May be related to how the CLI handles multi-byte Korean characters in combination with ASCII punctuation/numbers when clipboard monitoring is active

View original on GitHub ↗

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